Install package fails on Xamarin.Android and Xamarin.iOS
Closed this issue · 4 comments
I'm trying to use NGettext from Xamarin, I was able to install it into the PCL, however when it comes to installing it into the platform-specific projects, the installation process will fail with the following message:
"Failed to add reference to 'System.Collections'. Please make sure that it is in the Global Assembly Cache."
Taking a look at the output there is an other message right after the package installation failed:
"Install failed. Rolling back...
Package 'NGettext.0.6.1 : Microsoft.CSharp [4.0.1-rc2-24027, ), System.Collections [4.0.11-rc2-24027, ), System.Diagnostics.Debug [4.0.11-rc2-24027, ), System.Diagnostics.TraceSource [4.0.0-rc2-24027, ), System.Globalization [4.0.11-rc2-24027, ), System.IO [4.1.0-rc2-24027, ), System.IO.FileSystem [4.0.1-rc2-24027, ), System.Runtime [4.1.0-rc2-24027, ), System.Runtime.Extensions [4.1.0-rc2-24027, ), System.Runtime.InteropServices [4.1.0-rc2-24027, ), System.Text.RegularExpressions [4.0.12-rc2-24027, )' does not exist in project"
Does it mean that NGettext can't be used in Xamarin.Android and Xamarin.iOS projects?
Strange… It seems like your NuGet client tries to install .NETStandard 1.3 version of NGettext. But for Xamarin it should be either .NETStandard 1.0 or PCL versions.
Please look at the issue #8. I think you should use Xamarin Package Console Extension (sorry, I personally have never used Xamarin products).
It's probably because my PCL is Profile111, and it is not netstandard based yet, referencing the dll from the package's netstandard folder did the trick.
Quick update on the issue, it went away with the newest nuget package release.
Great! Thanks.