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.
Created attachment 22470 [details]
I downloaded the FlashCardPager sample (https://developer.xamarin.com/samples/monodroid/UserInterface%5CFlashCardPager/) and opened it in Visual Studio 2017 Enterprise (15.2). It get the following (expected) error:
Project FlashCardPager cannot build using Android 7.0 (API Level 24 - Nougat) because Android
SDK Platform for API Level is not installed ... (see screenshot-1.png).
This makes sense because this sample project was saved at 7.0:
Next, I changed the Minimum and Target Android versions to Android 6.0 (API Level 23), saved the changes,
exited and restarted Visual Studio.
However, when I try to open the project again, it still reports the Android 7.0 error
(see screenshot-2.png). I should not get this error because the Target Android version
is now set to Android 6.0 (as shown in the screenshot).
It looks like the .csproj file is not being updated during the save -- it still shows:
Created attachment 22471 [details]
Created attachment 22472 [details]
As a workaround, I can use vim to edit the .csproj file and change the TargetFrameworkVersion to "v6.0" -- after that, opening the project in Visual Studio no longer gives me the error. Build succeeds, but with warnings (shown in the third screenshot).
Created attachment 22473 [details]
Third screenshot (build warnings)
(In reply to Mark McLemore from comment #3)
> As a workaround, I can use vim to edit the .csproj file and change the
> TargetFrameworkVersion to "v6.0" -- after that, opening the project in
> Visual Studio no longer gives me the error. Build succeeds, but with
> warnings (shown in the third screenshot).
These two options do not affect the "TargetFrameworkVersion". You need to change the "Compile using Android version (Target FramewroK) option to get rid of this error message:
I am marking this as RESOLVED ANSWERED for the time being. Please reopen this bug if it happens when changing the option above and the reflected value is not changed in the .csproj when saving and closing the project.
Target Android version != Target Framework Version (Yes...Super confusing, thank google!)