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 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.
Went through a wonderful debugging odyssey with Jason Smith wherein:
1. Have Xamarin.Android Library project.
2. Set $(AndroidUseLatestPlatformSdk)=True in Project Preferences.
3. Add a Nuget package to the project, and add the GooglePlayServices package
4. Note that Nuget will only install GooglePlayServicesLib 19.0.0
Further note that the latest NuGet package version is 22!
Attempting to install 22.0.0 will result in an error, mentioning that "MonoAndroid,v2.2" isn't supported (or something like that).
The cause for the above NuGet error is that the .csproj has an *empty* $(TargetFrameworkVersion), so Xamarin.Android.Common.targets auto-sets it to v2.2, which isn't supported by the latest GooglePlayServices package.
Visual Studio MUST NOT clear out $(TargetFrameworkVersion); during the Xamarin.Android build, if $(AndroidUseLatestPlatformSdk) is True, then $(TargetFrameworkVersion) is ignored, but for *other* utilities *outside* the Xamarin.Android build process -- like the nuget package manager! -- the $(TargetFrameworkVersion) is hugely important.
Consequently, if $(AndroidUseLatestPlatformSdk) is set to True, then $(TargetFrameworkVersion) should be set to the currently know latest version, e.g. v5.0.
*** Bug 25534 has been marked as a duplicate of this bug. ***
I'm hitting this same issue. I can't figure out how to make a new android library that depends on the recyclerview. No matter how I configure the project Nuget refuses to install the support library.
Ok, we found the root cause for this and we'll have a fix next week.
Also, we could also reproduce this issue with Xamarin Studio when choosing Android 2.3 or lower versions. It might be worth to also report it for that product? cc'ing Greg who might be interested to look at the XS side.
Not really happy with thing since it will churn the csproj file, and isn't guaranteed to be 100% accurate, but I guess it's an unavoidable workaround for tools (e.g. NuGet) that read/evaluate TargetFrameworkVersion from the csproj file and aren't aware of AndroidUseLatestPlatformSdk.
We might be able to fix it better if we could compute the TargetFrameworkVersion value from property functions.
Alternatively could you provide the Xamarin Android Platforms as nuget packages (or possibly meta packages)? Then those version could be depended on.
While setting $(AndroidUseLatestPlatformSdk) to true no longer clears / overwrites any $(TargetFrameworkVersion) that exists in the .csproj, attempting to install the google play services NuGet from the PM console is still failing to install one of the dependencies in the above case that Ram has mentioned.
From what I've seen , this only occurs on the first installation attempt right after creating a new template. The same Installation command succeeds after closing and opening, or reloading the solution. I see no difference in the files before and after reloading the solution.
I've filed bug #29439 for similar behavior I'm seeing via the `Manage NuGet Packages` window. Presumably both Comment 11 and Bug #29439 have the same cause, and we can likely resolve this bug and track the other for a future release.
I am getting the same behaviour with C5SR2 latest build of XVS i.e. 5.11.666, as mentioned in Peter's comment 11.
And as per comment 12, this issue is tracked in bug 29439 for future release. So, I am updating its target milestone same as in bug 29439. We will verify this issue when bug 29439 will be resolved.
Mohit, can you work around 29439 and still verify the behavior after the first attempt?
It sounds like you'll only be blocked the first time:
> this only occurs on the first installation attempt right after creating a new template. The same Installation command succeeds after closing and opening, or reloading the solution.
Today, I have checked this issue again using Cycle 5 Trunk XVS 3.11.755 and observed that this issue is working fine, in first attempt I am able to install Xamarin.GooglePlayServices by nuget Manager console as shown in screencast : http://www.screencast.com/t/7UA3B4A8b
Hence closing this issue.