Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
This sample is failing to build due to:
>/monodroid-samples/BatchStepSensor/BatchStepSensor/BatchStepSensorFragment.cs(56,56): Error CS0117: `Android.Content.PM.PackageManager' does not contain a definition for `FeatureSensorStepCounter' (CS0117) (BatchStepSensor)
>/monodroid-samples/BatchStepSensor/BatchStepSensor/BatchStepSensorFragment.cs(56,56): Error CS0117: `Android.Content.PM.PackageManager' does not contain a definition for `FeatureSensorStepDetector' (CS0117) (BatchStepSensor)
1) Open the sample monodroid-samples/BatchStepSensor
2) Attempt to build under any configuration
*Expected Result: project builds without error
*Actual Result: project fails to build due to errors above
This issue is not occurring with c5sr3 XA 5.1.5-3.
The oldest known build which this occurs is XA 5.1.99-548.
Link to code on GitHub:
This is also occurring with monodroid-samples/KitKat:
>SensorsActivity.cs(58,75): error CS1061: Type `Android.Content.PM.PackageManager' does not contain a definition for `FeatureSensorStepCounter' and no extension method `FeatureSensorStepCounter' of type `Android.Content.PM.PackageManager' could be found. Are you missing an assembly reference?
Code on GitHub:
Strange, the project does appear to be properly targeting and compiling against API 19, which was when those consts were added.
Diagnostic build output:
Created attachment 12400 [details]
proof sshot that it works
It does build without any error here as the attached sshot shows.
I read through Peter's build log and the assembly resolution seems fine.
Mono.Android.dll for API Level 19 contains those fields on my environment. You guys might want to make sure that they exist in your environment. It might be that some old versions missed those fields.
I have no idea what's wrong there. It does not seem to be either generator issue or msbuild issue.
I am not seeing the fields in Mono.Android.dll for API Level 19 on my environment: http://screencast.com/t/hqlgkGfjq
They also were not included in other API levels when the general settings target framework was changed (API 21, 22. etc).
And fwiw, here is a gist of a the build output that I am getting: https://gist.github.com/BenBeckley/ab0bc6a752211f485c0f
As you are not able to reproduce this, is there any further investigation I can do on my end?
I'm no longer able to reproduce this with master / 5969ea371df8a. Not sure what ultimately caused this in the first place but it appears to be resolved.
I am seeing the same thing here and can't reproduce the issue with master / 5969ea37. The assembly references are there again whereas before they were missing, for me at least.