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 for Bug 59663 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 24859 [details]
Sample repro solution
On a brand new project (Xamarin iOS Single View App), adding a package to the project via the UI does not add a reference to the assembly in the package and there is no way to add the reference unless you browse the file system and add the assembly directly.
1- Launch VS for Mac
2- Click on new project, select "iOS single view app"
3- add a name and complete the wizard
4- expand the solution explorer and right click on "Packages" and select "Add Package"
5- Search for System.Security.Cryptography.Algorithms and add the package version 4.3.0, accept the license agreement dialog.
6- edit any cs source file and add the following to a function (i.e. main.cs inside Main())
System.Security.Cryptography.IncrementalHash h = null;
Application compiles correctly
Main.cs(10,42,10,57): error CS0234: The type or namespace name 'IncrementalHash' does not exist in the namespace 'System.Security.Cryptography' (are you missing an assembly reference?)
Adding other nuget packages result in added references and correct builds, we have only identified this issue with this particular nuget.
This seems to be the correct behaviour based on the System.Security.Cryptography 4.3.0 NuGet package. The lib folder in the NuGet package has an empty xamarinios10 folder so no references will be added. There are also no dependencies:
<group targetFramework="Xamarin.iOS1.0" />
Looking at this NuGet package it looks like it is assumed that Xamarin.iOS will provide the types for this itself and the NuGet package basically does nothing.
If you add a reference to System.Security using the Edit References dialog then that adds the namespace but IncrementalHash is missing.
So either this is a NuGet package problem or a type is missing from Xamarin.iOS.
The type is not missing, it's available in XI version of System.Security.Cryptography.Algorithm.dll located in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS//Facades/
However, I am not sure if this is nuget or msbuild issue because the facade is not used anywhere in the build, probably because it's transparent and therefore csc has no knowledge of the type
I'm not sure this bug belongs in Xamarin.iOS/MSBuild because it really has nothing to do with our targets.
I tried building the project and noticed this error too:
It could just be due to XI being too old (10.14.0.26).
The facades get expanded if there is any reference depending on `System.Runtime`. If the template project does not have such a reference and the nuget isn't adding anything either, then that might be the reason why facades are not being expanded.