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.
When compiling with Xamarin Studio Mac a Xamarin forms app where the pcl library has been converted to a netstandard library, the compiler fails with these errors. The same project builds and run fine using Visual Studio Windows.
error CS1070: The type `System.Resources.ResourceManager' has been forwarded to an assembly that is not referenced. Consider adding a reference to assembly `System.Resources.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
error CS1070: The type `System.IServiceProvider' has been forwarded to an assembly that is not referenced. Consider adding a reference to assembly `System.ComponentModel, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
netstandard profiles tryed: netstandard1.3 and netstandard1.6
Workaround: install .NET Core for Mac from instructions here https://www.microsoft.com/net/core#macos then on the command line:
xbuild MyClient.sln /t:MyClient_iOS /p:Configuration="AppStore" /p:Platform="Any Cpu"
Building from Xamarin Studio will still fail. You have to build from command line.
The workaround does not work for building. It fails with a mtouch error.
MTOUCH: error MT2001: Could not link assemblies. Reason: Value cannot be null.
Trying with VS Mac Preview 1
Same error. But with vs mac restore does work. There is only the mtouch error when linker is enabled. When linker is disabled it generates an IPA fine.
MTOUCH: error MT2001: Could not link assemblies. Reason: Value cannot be null.
Parameter name: variable
--- inner exception
System.ArgumentNullException: Value cannot be null.
Parameter name: variable
at Mono.Cecil.Cil.VariableIndex..ctor (Mono.Cecil.Cil.VariableDefinition variable) [0x00018] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/external/mono/external/cecil/Mono.Cecil.Cil/Symbols.cs:178
at Mono.Cecil.Cil.CodeReader.ReadScope (Mono.Cecil.Cil.ScopeDebugInformation scope) [0x0007b] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/external/mono/external/cecil/Mono.Cecil.Cil/CodeReader.cs:172
at Mono.Cecil.Cil.CodeReader.ReadScopes (Mono.Collections.Generic.Collection`1[T] scopes) [0x00007] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/external/mono/external/cecil/Mono.Cecil.Cil/CodeReader.cs:157
at Mono.Cecil.Cil.CodeReader.ReadScope (Mono.Cecil.Cil.ScopeDebugInformation scope) [0x000bc] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/external/mono/external/cecil/Mono.Cecil.Cil/CodeReader.cs:177
at Mono.Cecil.Cil.CodeReader.ReadDebugInfo () [0x00030] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/external/mono/external/cecil/Mono.Cecil.Cil/CodeReader.cs:97
at Mono.Cecil.Cil.CodeReader.ReadMethodBody () [0x000a9] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/external/mono/external/cecil/Mono.Cecil.Cil/CodeReader.cs:88
at Mono.Cecil.Cil.CodeReader.ReadMethodBody (Mono.Cecil.MethodDefinition method) [0x00014] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/external/mono/external/cecil/Mono.Cecil.Cil/CodeReader.cs:59
at Mono.Cecil.MetadataReader.ReadMethodBody (Mono.Cecil.MethodDefinition method) [0x00000] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/external/mono/external/cecil/Mono.Cecil/AssemblyReader.cs:2141
at Mono.Cecil.MethodDefinition.<get_Body>m__1 (Mono.Cecil.MethodDefinition method, Mono.Cecil.MetadataReader reader) [0x00000] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/external/mono/external/cecil/Mono.Cecil/MethodDefinition.cs:154
at Mono.Cecil.ModuleDefinition.Read[TItem,TRet] (TRet& variable, TItem item, System.Func`3[T1,T2,TResult] read) [0x00046] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/external/mono/external/cecil/Mono.Cecil/ModuleDefinition.cs:986
at Mono.Cecil.MethodDefinition.get_Body () [0x00032] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/external/mono/external/cecil/Mono.Cecil/MethodDefinition.cs:154
at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x0017d] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/external/mono/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs:1017
at Xamarin.Linker.Steps.CoreMarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00017] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/tools/linker/CoreMarkStep.cs:153
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00026] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/external/mono/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs:125
at Mono.Linker.Steps.MarkStep.Process () [0x0001e] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/external/mono/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs:115
at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x0000f] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/external/mono/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs:60
at Xamarin.Linker.Steps.MobileMarkStep.Process (Mono.Linker.LinkContext context) [0x00003] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/tools/linker/MobileMarkStep.cs:31
at Xamarin.Linker.Steps.CoreMarkStep.Process (Mono.Linker.LinkContext context) [0x00018] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/tools/linker/CoreMarkStep.cs:26
at MonoTouch.Tuner.MonoTouchMarkStep.Process (Mono.Linker.LinkContext context) [0x0001e] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/tools/linker/MonoTouch.Tuner/MonoTouchMarkStep.cs:36
at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00027] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/external/mono/mcs/tools/linker/Mono.Linker/Pipeline.cs:118
at MonoTouch.Tuner.Linker.Process (MonoTouch.Tuner.LinkerOptions options, MonoTouch.Tuner.MonoTouchLinkContext& context, System.Collections.Generic.List`1[System.String]& assemblies) [0x000ac] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/tools/mtouch/Tuning.cs:77
at MonoTouch.Tuner.Linker.Process (MonoTouch.Tuner.LinkerOptions options, MonoTouch.Tuner.MonoTouchLinkContext& context, System.Collections.Generic.List`1[System.String]& assemblies) [0x00153] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/tools/mtouch/Tuning.cs:90
at Xamarin.Bundler.Target.LinkAssemblies (System.String main, System.Collections.Generic.List`1[System.String]& assemblies, System.String output_dir, MonoTouch.Tuner.MonoTouchLinkContext& link_context) [0x001b3] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/tools/mtouch/Target.cs:414
at Xamarin.Bundler.Target.ManagedLink () [0x003ed] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/tools/mtouch/Target.cs:506
at Xamarin.Bundler.Target.ProcessAssemblies () [0x000e6] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/tools/mtouch/Target.cs:631
at Xamarin.Bundler.Application.BuildApp () [0x00036] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/tools/mtouch/Application.cs:895
at Xamarin.Bundler.Application.Build () [0x00058] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/tools/mtouch/Application.cs:563
at Xamarin.Bundler.Driver.Main2 (System.String args) [0x01cd7] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/tools/mtouch/mtouch.cs:1520
at Xamarin.Bundler.Driver.Main (System.String args) [0x0000f] in /Users/builder/data/lanes/3985/62816dd6/source/xamarin-macios/tools/mtouch/mtouch.cs:1007
Task "MTouch" execution -- FAILED
Done building target "_CompileToNative" in project
The problem was that a dependant library project was not included in the build configuration. I updated the configuration mapping and now the appstore/release build with another error which seems related to http://unix.stackexchange.com/questions/108174/how-to-persist-ulimit-settings-in-osx-mavericks.
Note that Visual Studio now builds the AppStore/Release without error, but does not generate the ipa file.
Yes it worked !
Thanks for this bugzilla :)
I'm getting a restore error saying Xamarin.Forms isn't compatible with netstandard (all versions), with XS or VS mac (same thing):
Package Xamarin.Forms 220.127.116.11 is not compatible with netstandard1.5 (.NETStandard,Version=v1.5). Package Xamarin.Forms 18.104.22.168 supports:
- monoandroid10 (MonoAndroid,Version=v1.0)
- monotouch10 (MonoTouch,Version=v1.0)
- portable-monoandroid10+monotouch10+net45+win+win81+wp8+wpa81+xamarinios10 (.NETPortable,Version=v0.0,Profile=win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10)
- uap10.0 (UAP,Version=v10.0)
- win81 (Windows,Version=v8.1)
- wp8 (WindowsPhone,Version=v8.0)
- wpa81 (WindowsPhoneApp,Version=v8.1)
- xamarinios10 (Xamarin.iOS,Version=v1.0)
Could you please give us you about information (Xamarin Studio > About Xamarin Studio) so we know your exact setup as well as exact repro step?
It's a bit confusing right now because you seem to have fixed things locally so I'm not sure there's an issue on our end, if so we'd be happy to fix it (:
Just to add to Vincent's comment, I am unable to reproduce the same build errors.
My test steps were:
1) With Visual Studio for Mac create a new Xamarin.Forms project.
a) Select Android and iOS.
b) Select PCL.
c )Do not select use xaml.
2) Wait for NuGet packages to be added.
3) Open project options for the PCL project
4) Go to build - general and select .NETStandard Platform. Click OK.
5) Wait for package restore to complete.
6) Package restore fails saying that Xamarin.Forms is not compatible with .NETStandard - "Package Xamarin.Forms 22.214.171.124 is not compatible with netstandard1.5 "
- Visual Studio shows the same restore error.
7) Add an imports line to the project.json file to allow Xamarin.Forms to be treated as compatible:
8) Save the project.json file to trigger a NuGet package restore.
9) Rebuild the entire solution.
10) Build is successful.
So if you can provide test steps or a small project that reproduces the problem that would be really helpful, thanks.
Yes Visual studio for mac does Work perfectly.
I switched to it.
I was able to archive for the AppStore and publish the app after I added the mac setting to enable more simultaneous file descriptors.
But the current xamarin studio stable/beta/alpha do have issues: my project won't even compile on them (although it does in visual studio windows paired with a mac).
what information do you need ?
Xamarin Studio from the alpha channel works OK for me. The only problem I had was that it did not work if in the global Preferences - Projects - Build the Build with MSBuild setting was enabled. It only seems to compile without errors if this is unselected so xbuild is being used. When it was enabled I had to disable it and close and re-open the solution to get the build to work.
Xamarin Studio from the alpha channel is the first version where you could switch a PCL project to a .NETStandard project. Earlier versions do not support this and you would have had to create the project.json file manually.
This is happening to me as well, in Xamarin Studio on macOS (stable as well as alpha). Is there anyone looking into this? I see the status is NEEDINFO. What information is still needed?
I have a workaround:
Use visual studio mac preview.
It works fine !!
Yup. Works! Thanks softlion.
@David - It would be good to find the steps to reproduce the problem and the environment information from the About dialog - Details. I cannot reproduce it using the steps I tried in #c8.
@David could you please provide the info requested by @Matt so that we can move forward with the bug? Thx!
It may take me some time to set up. I'd need to gut our current project of everything sensitive. I already migrated to Visual Studio Preview for Mac, and it's working just fine. But I'll try to make time to make a small project that reproduces the problem.
@David any information about the project?
We have not received the requested information. If you are still
experiencing this issue please provide all the requested information
and re-open the bug report. Thanks!