locked
Visual Studio for Mac "csc.exe exited with code 1" when building Xamarin.iOS project. RRS feed

  • Question

  • User1673 posted

    After updating to the most recent release of VS for Mac, my Xamarin.iOS project no longer builds and I'm given the error above. After digging through the build output, I'm seeing this exception get raised:

    Unhandled Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary2[TKey,TValue].get_Item (TKey key) [0x0001e] in <164469fa6d844a078126fd8006807335>:0 at Microsoft.Cci.FullMetadataWriter+DefinitionIndex1[T].getItem (T item) [0x00000] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.FullMetadataWriter.GetMethodDefinitionHandle (Microsoft.Cci.IMethodDefinition def) [0x00007] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.MetadataWriter.SerializeMethodDebugInfo (Microsoft.Cci.IMethodBody bodyOpt, System.Int32 methodRid, System.Reflection.Metadata.StandaloneSignatureHandle localSignatureHandleOpt, System.Reflection.Metadata.LocalVariableHandle& lastLocalVariableHandle, System.Reflection.Metadata.LocalConstantHandle& lastLocalConstantHandle) [0x0024d] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.MetadataWriter.SerializeMethodBodies (System.Reflection.Metadata.BlobBuilder ilBuilder, Microsoft.Cci.PdbWriter nativePdbWriterOpt, System.Reflection.Metadata.Blob& mvidStringFixup) [0x000d7] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.MetadataWriter.BuildMetadataAndIL (Microsoft.Cci.PdbWriter nativePdbWriterOpt, System.Reflection.Metadata.BlobBuilder ilBuilder, System.Reflection.Metadata.BlobBuilder mappedFieldDataBuilder, System.Reflection.Metadata.BlobBuilder managedResourceDataBuilder, System.Reflection.Metadata.Blob& mvidFixup, System.Reflection.Metadata.Blob& mvidStringFixup) [0x00032] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.PeWriter.WritePeToStream (Microsoft.CodeAnalysis.Emit.EmitContext context, Microsoft.CodeAnalysis.CommonMessageProvider messageProvider, System.Func1[TResult] getPeStream, System.Func1[TResult] getPortablePdbStreamOpt, Microsoft.Cci.PdbWriter nativePdbWriterOpt, System.String pdbPathOpt, System.Boolean allowMissingMethodBodies, System.Boolean isDeterministic, System.Threading.CancellationToken cancellationToken) [0x0004c] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.CodeAnalysis.Compilation.SerializeToPeStream (Microsoft.CodeAnalysis.Emit.CommonPEModuleBuilder moduleBeingBuilt, Microsoft.CodeAnalysis.Compilation+EmitStreamProvider peStreamProvider, Microsoft.CodeAnalysis.Compilation+EmitStreamProvider pdbStreamProvider, System.Func1[TResult] testSymWriterFactory, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, System.Boolean metadataOnly, System.Threading.CancellationToken cancellationToken) [0x00120] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.CodeAnalysis.CommonCompiler.RunCore (System.IO.TextWriter consoleOutput, Microsoft.CodeAnalysis.ErrorLogger errorLogger, System.Threading.CancellationToken cancellationToken) [0x00475] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.CodeAnalysis.CommonCompiler.Run (System.IO.TextWriter consoleOutput, System.Threading.CancellationToken cancellationToken) [0x00035] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 /Users/gregory.gammon/Documents/Developer/Swishlinks/Swishlinks.DataTransferObjects.Shared/Story/Story.cs(11,15,11,20): warning CS0659: 'Story' overrides Object.Equals(object o) but does not override Object.GetHashCode() at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc+<>c__DisplayClass1_0.<Run>b__0 (System.IO.TextWriter tw) [0x00000] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CommandLine.ConsoleUtil.RunWithUtf8Output[T] (System.Func2[T,TResult] func) [0x0001c] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CommandLine.ConsoleUtil.RunWithUtf8Output[T] (System.Boolean utf8Output, System.IO.TextWriter textWriter, System.Func2[T,TResult] func) [0x00016] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc.Run (System.String[] args, Microsoft.CodeAnalysis.BuildPaths buildPaths, System.IO.TextWriter textWriter, Microsoft.CodeAnalysis.IAnalyzerAssemblyLoader analyzerLoader) [0x00048] in <0b73f303db124699a9f415aa972a6e9f>:0 at (wrapper delegate-invoke) <Module>:invoke_int_string[]_BuildPaths_TextWriter_IAnalyzerAssemblyLoader (string[],Microsoft.CodeAnalysis.BuildPaths,System.IO.TextWriter,Microsoft.CodeAnalysis.IAnalyzerAssemblyLoader) at Microsoft.CodeAnalysis.CommandLine.DesktopBuildClient.RunLocalCompilation (System.String[] arguments, Microsoft.CodeAnalysis.BuildPaths buildPaths, System.IO.TextWriter textWriter) [0x00000] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CommandLine.BuildClient.RunCompilation (System.Collections.Generic.IEnumerable1[T] originalArguments, Microsoft.CodeAnalysis.BuildPaths buildPaths, System.IO.TextWriter textWriter) [0x0009d] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CommandLine.DesktopBuildClient.Run (System.Collections.Generic.IEnumerable1[T] arguments, System.Collections.Generic.IEnumerable1[T] extraArguments, Microsoft.CodeAnalysis.CommandLine.RequestLanguage language, Microsoft.CodeAnalysis.CommandLine.CompileFunc compileFunc, Microsoft.CodeAnalysis.IAnalyzerAssemblyLoader analyzerAssemblyLoader) [0x0003e] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main (System.String[] args, System.String[] extraArgs) [0x00018] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main (System.String[] args) [0x00006] in <0b73f303db124699a9f415aa972a6e9f>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary2[TKey,TValue].get_Item (TKey key) [0x0001e] in <164469fa6d844a078126fd8006807335>:0 at Microsoft.Cci.FullMetadataWriter+DefinitionIndex1[T].getItem (T item) [0x00000] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.FullMetadataWriter.GetMethodDefinitionHandle (Microsoft.Cci.IMethodDefinition def) [0x00007] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.MetadataWriter.SerializeMethodDebugInfo (Microsoft.Cci.IMethodBody bodyOpt, System.Int32 methodRid, System.Reflection.Metadata.StandaloneSignatureHandle localSignatureHandleOpt, System.Reflection.Metadata.LocalVariableHandle& lastLocalVariableHandle, System.Reflection.Metadata.LocalConstantHandle& lastLocalConstantHandle) [0x0024d] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.MetadataWriter.SerializeMethodBodies (System.Reflection.Metadata.BlobBuilder ilBuilder, Microsoft.Cci.PdbWriter nativePdbWriterOpt, System.Reflection.Metadata.Blob& mvidStringFixup) [0x000d7] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.MetadataWriter.BuildMetadataAndIL (Microsoft.Cci.PdbWriter nativePdbWriterOpt, System.Reflection.Metadata.BlobBuilder ilBuilder, System.Reflection.Metadata.BlobBuilder mappedFieldDataBuilder, System.Reflection.Metadata.BlobBuilder managedResourceDataBuilder, System.Reflection.Metadata.Blob& mvidFixup, System.Reflection.Metadata.Blob& mvidStringFixup) [0x00032] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.PeWriter.WritePeToStream (Microsoft.CodeAnalysis.Emit.EmitContext context, Microsoft.CodeAnalysis.CommonMessageProvider messageProvider, System.Func1[TResult] getPeStream, System.Func1[TResult] getPortablePdbStreamOpt, Microsoft.Cci.PdbWriter nativePdbWriterOpt, System.String pdbPathOpt, System.Boolean allowMissingMethodBodies, System.Boolean isDeterministic, System.Threading.CancellationToken cancellationToken) [0x0004c] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.CodeAnalysis.Compilation.SerializeToPeStream (Microsoft.CodeAnalysis.Emit.CommonPEModuleBuilder moduleBeingBuilt, Microsoft.CodeAnalysis.Compilation+EmitStreamProvider peStreamProvider, Microsoft.CodeAnalysis.Compilation+EmitStreamProvider pdbStreamProvider, System.Func1[TResult] testSymWriterFactory, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, System.Boolean metadataOnly, System.Threading.CancellationToken cancellationToken) [0x00120] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.CodeAnalysis.CommonCompiler.RunCore (System.IO.TextWriter consoleOutput, Microsoft.CodeAnalysis.ErrorLogger errorLogger, System.Threading.CancellationToken cancellationToken) [0x00475] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.CodeAnalysis.CommonCompiler.Run (System.IO.TextWriter consoleOutput, System.Threading.CancellationToken cancellationToken) [0x00035] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc+<>c__DisplayClass1_0.<Run>b__0 (System.IO.TextWriter tw) [0x00000] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CommandLine.ConsoleUtil.RunWithUtf8Output[T] (System.Func2[T,TResult] func) [0x0001c] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CommandLine.ConsoleUtil.RunWithUtf8Output[T] (System.Boolean utf8Output, System.IO.TextWriter textWriter, System.Func2[T,TResult] func) [0x00016] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc.Run (System.String[] args, Microsoft.CodeAnalysis.BuildPaths buildPaths, System.IO.TextWriter textWriter, Microsoft.CodeAnalysis.IAnalyzerAssemblyLoader analyzerLoader) [0x00048] in <0b73f303db124699a9f415aa972a6e9f>:0 at (wrapper delegate-invoke) <Module>:invoke_int_string[]_BuildPaths_TextWriter_IAnalyzerAssemblyLoader (string[],Microsoft.CodeAnalysis.BuildPaths,System.IO.TextWriter,Microsoft.CodeAnalysis.IAnalyzerAssemblyLoader) at Microsoft.CodeAnalysis.CommandLine.DesktopBuildClient.RunLocalCompilation (System.String[] arguments, Microsoft.CodeAnalysis.BuildPaths buildPaths, System.IO.TextWriter textWriter) [0x00000] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CommandLine.BuildClient.RunCompilation (System.Collections.Generic.IEnumerable1[T] originalArguments, Microsoft.CodeAnalysis.BuildPaths buildPaths, System.IO.TextWriter textWriter) [0x0009d] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CommandLine.DesktopBuildClient.Run (System.Collections.Generic.IEnumerable1[T] arguments, System.Collections.Generic.IEnumerable1[T] extraArguments, Microsoft.CodeAnalysis.CommandLine.RequestLanguage language, Microsoft.CodeAnalysis.CommandLine.CompileFunc compileFunc, Microsoft.CodeAnalysis.IAnalyzerAssemblyLoader analyzerAssemblyLoader) [0x0003e] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main (System.String[] args, System.String[] extraArgs) [0x00018] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main (System.String[] args) [0x00006] in <0b73f303db124699a9f415aa972a6e9f>:0

    I'm not sure what exactly changed that would cause this, I'm able to build this project in Xamarin Studio without issues.

    Thursday, April 20, 2017 5:25 PM

All replies

  • User104401 posted

    Same problem, any solution?

    Wednesday, April 26, 2017 11:00 AM
  • User21936 posted

    Can you confirm that you have tried a full clean and rebuild of your project? You can use the "Clean Solution" item from the Build menu, but if still having the issue additionally use Finder to delete all of the bin and obj folders in all of the project directories in your solution.

    Thursday, April 27, 2017 12:15 AM
  • User104401 posted

    I cleaned the solution and deleted all "obj" and "bin" folders of my project.

    I've got two projects. 1. Xamarin.Forms with PCL 2. Xamarin.Android / Xamarin.iOS with shared projects and native bindings.

    In project 1 everything works without problems In project 2 Xamarin.iOS doesn't work, following exception:

    In project 2 I get this error in Xamarin Studio (BETA-Channel) and Visual Studio. In Xamarin-Studio RELEASE-Channel everything works fine.

    This compile error only occurs when I try to debug. Release build compiles without errors.

    ``` Unhandled Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary2[TKey,TValue].get_Item (TKey key) [0x0001e] in <5357e6452d21439088fd8589dfcf1134>:0 at Microsoft.Cci.FullMetadataWriter+DefinitionIndex1[T].getItem (T item) [0x00000] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.FullMetadataWriter.GetMethodDefinitionHandle (Microsoft.Cci.IMethodDefinition def) [0x00007] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.MetadataWriter.SerializeMethodDebugInfo (Microsoft.Cci.IMethodBody bodyOpt, System.Int32 methodRid, System.Reflection.Metadata.StandaloneSignatureHandle localSignatureHandleOpt, System.Reflection.Metadata.LocalVariableHandle& lastLocalVariableHandle, System.Reflection.Metadata.LocalConstantHandle& lastLocalConstantHandle) [0x0024d] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.MetadataWriter.SerializeMethodBodies (System.Reflection.Metadata.BlobBuilder ilBuilder, Microsoft.Cci.PdbWriter nativePdbWriterOpt, System.Reflection.Metadata.Blob& mvidStringFixup) [0x000d7] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.MetadataWriter.BuildMetadataAndIL (Microsoft.Cci.PdbWriter nativePdbWriterOpt, System.Reflection.Metadata.BlobBuilder ilBuilder, System.Reflection.Metadata.BlobBuilder mappedFieldDataBuilder, System.Reflection.Metadata.BlobBuilder managedResourceDataBuilder, System.Reflection.Metadata.Blob& mvidFixup, System.Reflection.Metadata.Blob& mvidStringFixup) [0x00032] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.PeWriter.WritePeToStream (Microsoft.CodeAnalysis.Emit.EmitContext context, Microsoft.CodeAnalysis.CommonMessageProvider messageProvider, System.Func1[TResult] getPeStream, System.Func1[TResult] getPortablePdbStreamOpt, Microsoft.Cci.PdbWriter nativePdbWriterOpt, System.String pdbPathOpt, System.Boolean allowMissingMethodBodies, System.Boolean isDeterministic, System.Threading.CancellationToken cancellationToken) [0x0004c] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.CodeAnalysis.Compilation.SerializeToPeStream (Microsoft.CodeAnalysis.Emit.CommonPEModuleBuilder moduleBeingBuilt, Microsoft.CodeAnalysis.Compilation+EmitStreamProvider peStreamProvider, Microsoft.CodeAnalysis.Compilation+EmitStreamProvider pdbStreamProvider, System.Func1[TResult] testSymWriterFactory, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, System.Boolean metadataOnly, System.Threading.CancellationToken cancellationToken) [0x00120] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.CodeAnalysis.CommonCompiler.RunCore (System.IO.TextWriter consoleOutput, Microsoft.CodeAnalysis.ErrorLogger errorLogger, System.Threading.CancellationToken cancellationToken) [0x00475] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.CodeAnalysis.CommonCompiler.Run (System.IO.TextWriter consoleOutput, System.Threading.CancellationToken cancellationToken) [0x00035] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc+<>c__DisplayClass1_0.<Run>b__0 (System.IO.TextWriter tw) [0x00000] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CommandLine.ConsoleUtil.RunWithUtf8Output[T] (System.Boolean utf8Output, System.IO.TextWriter textWriter, System.Func2[T,TResult] func) [0x0001d] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc.Run (System.String[] args, Microsoft.CodeAnalysis.BuildPaths buildPaths, System.IO.TextWriter textWriter, Microsoft.CodeAnalysis.IAnalyzerAssemblyLoader analyzerLoader) [0x00048] in <0b73f303db124699a9f415aa972a6e9f>:0 at (wrapper delegate-invoke) :invokeintstring[]BuildPathsTextWriterIAnalyzerAssemblyLoader (string[],Microsoft.CodeAnalysis.BuildPaths,System.IO.TextWriter,Microsoft.CodeAnalysis.IAnalyzerAssemblyLoader) at Microsoft.CodeAnalysis.CommandLine.DesktopBuildClient.RunLocalCompilation (System.String[] arguments, Microsoft.CodeAnalysis.BuildPaths buildPaths, System.IO.TextWriter textWriter) [0x00000] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CommandLine.BuildClient.RunCompilation (System.Collections.Generic.IEnumerable1[T] originalArguments, Microsoft.CodeAnalysis.BuildPaths buildPaths, System.IO.TextWriter textWriter) [0x0009d] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CommandLine.DesktopBuildClient.Run (System.Collections.Generic.IEnumerable1[T] arguments, System.Collections.Generic.IEnumerable1[T] extraArguments, Microsoft.CodeAnalysis.CommandLine.RequestLanguage language, Microsoft.CodeAnalysis.CommandLine.CompileFunc compileFunc, Microsoft.CodeAnalysis.IAnalyzerAssemblyLoader analyzerAssemblyLoader) [0x0003e] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main (System.String[] args, System.String[] extraArgs) [0x00018] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main (System.String[] args) [0x00006] in <0b73f303db124699a9f415aa972a6e9f>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary2[TKey,TValue].getItem (TKey key) [0x0001e] in <5357e6452d21439088fd8589dfcf1134>:0 at Microsoft.Cci.FullMetadataWriter+DefinitionIndex1[T].get_Item (T item) [0x00000] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.FullMetadataWriter.GetMethodDefinitionHandle (Microsoft.Cci.IMethodDefinition def) [0x00007] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.MetadataWriter.SerializeMethodDebugInfo (Microsoft.Cci.IMethodBody bodyOpt, System.Int32 methodRid, System.Reflection.Metadata.StandaloneSignatureHandle localSignatureHandleOpt, System.Reflection.Metadata.LocalVariableHandle& lastLocalVariableHandle, System.Reflection.Metadata.LocalConstantHandle& lastLocalConstantHandle) [0x0024d] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.MetadataWriter.SerializeMethodBodies (System.Reflection.Metadata.BlobBuilder ilBuilder, Microsoft.Cci.PdbWriter nativePdbWriterOpt, System.Reflection.Metadata.Blob& mvidStringFixup) [0x000d7] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.MetadataWriter.BuildMetadataAndIL (Microsoft.Cci.PdbWriter nativePdbWriterOpt, System.Reflection.Metadata.BlobBuilder ilBuilder, System.Reflection.Metadata.BlobBuilder mappedFieldDataBuilder, System.Reflection.Metadata.BlobBuilder managedResourceDataBuilder, System.Reflection.Metadata.Blob& mvidFixup, System.Reflection.Metadata.Blob& mvidStringFixup) [0x00032] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.Cci.PeWriter.WritePeToStream (Microsoft.CodeAnalysis.Emit.EmitContext context, Microsoft.CodeAnalysis.CommonMessageProvider messageProvider, System.Func1[TResult] getPeStream, System.Func1[TResult] getPortablePdbStreamOpt, Microsoft.Cci.PdbWriter nativePdbWriterOpt, System.String pdbPathOpt, System.Boolean allowMissingMethodBodies, System.Boolean isDeterministic, System.Threading.CancellationToken cancellationToken) [0x0004c] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.CodeAnalysis.Compilation.SerializeToPeStream (Microsoft.CodeAnalysis.Emit.CommonPEModuleBuilder moduleBeingBuilt, Microsoft.CodeAnalysis.Compilation+EmitStreamProvider peStreamProvider, Microsoft.CodeAnalysis.Compilation+EmitStreamProvider pdbStreamProvider, System.Func1[TResult] testSymWriterFactory, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, System.Boolean metadataOnly, System.Threading.CancellationToken cancellationToken) [0x00120] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.CodeAnalysis.CommonCompiler.RunCore (System.IO.TextWriter consoleOutput, Microsoft.CodeAnalysis.ErrorLogger errorLogger, System.Threading.CancellationToken cancellationToken) [0x00475] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.CodeAnalysis.CommonCompiler.Run (System.IO.TextWriter consoleOutput, System.Threading.CancellationToken cancellationToken) [0x00035] in <12d27e16f5684917a6cbffa8f9cc6eae>:0 at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc+<>cDisplayClass10.b0 (System.IO.TextWriter tw) [0x00000] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CommandLine.ConsoleUtil.RunWithUtf8Output[T] (System.Boolean utf8Output, System.IO.TextWriter textWriter, System.Func2[T,TResult] func) [0x0001d] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc.Run (System.String[] args, Microsoft.CodeAnalysis.BuildPaths buildPaths, System.IO.TextWriter textWriter, Microsoft.CodeAnalysis.IAnalyzerAssemblyLoader analyzerLoader) [0x00048] in <0b73f303db124699a9f415aa972a6e9f>:0 at (wrapper delegate-invoke) <Module>:invoke_int_string[]_BuildPaths_TextWriter_IAnalyzerAssemblyLoader (string[],Microsoft.CodeAnalysis.BuildPaths,System.IO.TextWriter,Microsoft.CodeAnalysis.IAnalyzerAssemblyLoader) at Microsoft.CodeAnalysis.CommandLine.DesktopBuildClient.RunLocalCompilation (System.String[] arguments, Microsoft.CodeAnalysis.BuildPaths buildPaths, System.IO.TextWriter textWriter) [0x00000] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CommandLine.BuildClient.RunCompilation (System.Collections.Generic.IEnumerable1[T] originalArguments, Microsoft.CodeAnalysis.BuildPaths buildPaths, System.IO.TextWriter textWriter) [0x0009d] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CommandLine.DesktopBuildClient.Run (System.Collections.Generic.IEnumerable1[T] arguments, System.Collections.Generic.IEnumerable1[T] extraArguments, Microsoft.CodeAnalysis.CommandLine.RequestLanguage language, Microsoft.CodeAnalysis.CommandLine.CompileFunc compileFunc, Microsoft.CodeAnalysis.IAnalyzerAssemblyLoader analyzerAssemblyLoader) [0x0003e] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main (System.String[] args, System.String[] extraArgs) [0x00018] in <0b73f303db124699a9f415aa972a6e9f>:0 at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main (System.String[] args) [0x00006] in <0b73f303db124699a9f415aa972a6e9f>:0 /Library/Frameworks/Mono.framework/Versions/5.0.0/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets: error : Compiler crashed with code: 1. Task "Csc" execution -- FAILED Done building target "CoreCompile" in project "/Users/eduard/Documents/Projects/EasySmartHomeApps/EasyiOs/EASYApp.iOS.csproj".-- FAILED

    Done building project "/Users/eduard/Documents/Projects/EasySmartHomeApps/EasyiOs/EASYApp.iOS.csproj".-- FAILED

    Build FAILED.

    ```

    Thanks in advance // EDDY

    Friday, April 28, 2017 6:55 PM
  • User21936 posted

    This is most likely this issue:

    https://github.com/dotnet/roslyn/issues/17934

    Also brought up in this bug report (thought this bug report is about one of our samples hitting the Roslyn issue above): https://bugzilla.xamarin.com/show_bug.cgi?id=55283

    Monday, May 1, 2017 6:40 PM
  • User1673 posted

    @JGoldberger said: This is most likely this issue:

    https://github.com/dotnet/roslyn/issues/17934

    Also brought up in this bug report (thought this bug report is about one of our samples hitting the Roslyn issue above): https://bugzilla.xamarin.com/show_bug.cgi?id=55283

    Has this been rolled into the alpha channel yet? I just pulled the most recent VS for Mac and I'm still experiencing the same issue.

    Visual Studio for Mac Preview Version Preview 10 (7.0 build 3051) Installation UUID: 1199034a-1c7c-4a33-964f-0ed7b6996d2c Runtime: Mono 5.0.0.94 (2017-02/1d0445b) (64-bit) GTK+ 2.24.23 (Raleigh theme)

    Package version: 500000094

    NuGet Version: 4.0.0.2323

    .NET Core Runtime: Not installed SDK: Not installed MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.0.0/lib/mono/msbuild/15.0/bin/Sdks

    Xamarin.Profiler Version: 1.5.4 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

    Xamarin.Android Version: 7.3.0.13 (Visual Studio Enterprise) Android SDK: /Users/gregory.gammon/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 4.0.3 (API level 15) 6.0 (API level 23) 7.0 (API level 24) 7.1 (API level 25)

    SDK Tools Version: 25.2.5 SDK Platform Tools Version: 25.0.4 SDK Build Tools Version: 25.0.1

    Java SDK: /usr java version "1.8.0101" Java(TM) SE Runtime Environment (build 1.8.0101-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

    Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL

    Xamarin Inspector Version: 1.2.2 Hash: b71b035 Branch: d15-1 Build date: Fri, 21 Apr 2017 17:57:12 GMT

    Apple Developer Tools Xcode 8.3.2 (12175) Build 8E2002

    Xamarin.iOS Version: 10.10.0.30 (Visual Studio Enterprise) Hash: 30b6e87e Branch: d15-2 Build date: 2017-04-28 17:17:13-0400

    Xamarin.Mac Version: 3.4.0.30 (Visual Studio Enterprise)

    Build Information Release ID: 700003051 Git revision: e5296061de5c6b093fb59668526728f2b82caa91 Build date: 2017-05-01 09:58:05-04 Xamarin addins: 7123ae956f3089f398cc9eae6bba94037ca896e6 Build lane: monodevelop-lion-d15-2

    Operating System Mac OS X 10.12.4 Darwin 16.5.0 Darwin Kernel Version 16.5.0 Fri Mar 3 16:52:33 PST 2017 root:xnu-3789.51.2~3/RELEASEX8664 x86_64

    Enabled user installed addins FileNesting 0.1.1

    Tuesday, May 9, 2017 3:01 PM
  • User21936 posted

    @ggammon

    @ggammon said: Has this been rolled into the alpha channel yet? I just pulled the most recent VS for Mac and I'm still experiencing the same issue.

    No, I see that the pull request with the fix has been merged into the Roslyn master, but I do not know when a version with the fix will be released.

    Tuesday, May 9, 2017 8:10 PM
  • User238981 posted

    Hey, this is a reproducible bug in the GA Build of VS Mac and in the stable channel of Xamarin Studio... Any update around the corner? Or do we have to downgrade roslyn?

    Wednesday, May 10, 2017 10:16 PM
  • User307845 posted

    +1. Still happening. Ridiculously frustrating.

    Wednesday, May 10, 2017 10:55 PM
  • User27689 posted

    Any update?

    Thursday, May 11, 2017 9:03 AM
  • User39218 posted

    The same problem occurred when updating on the last Xamarin Studio

    I download and install last mono from here http://www.mono-project.com/download/

    This resolve my problem

    Thursday, May 11, 2017 10:12 AM
  • User15596 posted

    +1. Still happening. Any update?

    Thursday, May 11, 2017 2:37 PM
  • User13824 posted

    Bugzilla cross-reference

    Public bug to track the inclusion of the upstream Roslyn csc.exe fix into Mono 5.0:

    (This bug report also includes a partial temporary workaround of going back to using Mono's mcs compiler. Both mcs and csc are included in both Mono 4.8.1 and Mono 5.0, but Mono 4.8.1 uses mcs by default whereas Mono 5.0 uses csc.)

    Thursday, May 11, 2017 8:51 PM
  • User30225 posted

    @BrendanZagaeski said:

    Bugzilla cross-reference

    Public bug to track the inclusion of the upstream Roslyn csc.exe fix into Mono 5.0:

    (This bug report also includes a partial temporary workaround of going back to using Mono's mcs compiler. Both mcs and csc are included in both Mono 4.8.1 and Mono 5.0, but Mono 4.8.1 uses mcs by default whereas Mono 5.0 uses csc.)

    Thank you very much for pointing to the workaround. It worked for me :)

    Friday, May 12, 2017 6:40 AM
  • User306235 posted

    Try to redesign your "async partial" method's, it should work for Mono 5.0 "csc" compiler.

    //From:
    async partial void ButtonOnClick(Button sender)
    {
        await DoAsync();
    }
    //to
    partial void ButtonOnClick(Button sender)
    {
        Task.Run(async () => await DoAsync());
    }
    //or in my case
    partial void ButtonOnClick(Button sender)
    {
        InvokeOnMainThread(async () => await DoAsync());
    }
    
    Friday, May 12, 2017 10:53 AM
  • User30225 posted

    After applying the workaround mentioned above, none of the breakpoints get hit. Are these issues related?

    Monday, May 15, 2017 9:11 AM
  • User80692 posted

    Same issue here. We need a fix for this issue. I do not understand, how can this happen in a stable release?

    Monday, May 15, 2017 9:43 AM
  • User35208 posted

    FYI...I have entered this bug https://bugzilla.xamarin.com/showbug.cgi?id=56451 for Visual Studio for MAC and this bug https://bugzilla.xamarin.com/showbug.cgi?id=55736 for Xamarin Studio.

    I guess I'll try the workaround and see if that helps.

    The workaround worked for me.

    Monday, May 15, 2017 1:46 PM
  • User1673 posted

    @TedRogers said: FYI...I have entered this bug https://bugzilla.xamarin.com/showbug.cgi?id=56451 for Visual Studio for MAC and this bug https://bugzilla.xamarin.com/showbug.cgi?id=55736 for Xamarin Studio.

    I guess I'll try the workaround and see if that helps.

    The workaround worked for me.

    Yeah the workaround worked for me too, except all of my breakpoints are no longer functioning. Really hoping this gets expedited because this is really frustrating.

    Monday, May 15, 2017 3:27 PM
  • User35208 posted

    @ggammon breakpoints are working for me but have seen that before where I need to do a full clean and restart Xamarin Studio. Not sure what is more frustrating, the compile crash of the fact that iOS device builds are taking forever!

    Monday, May 15, 2017 4:53 PM
  • User13824 posted

    After applying the workaround mentioned above, none of the breakpoints get hit.

    Correct. Unfortunately, as stated in the cross-reference comment above, changing the compiler to mcs is only a partial workaround.

    And as mentioned at the top of Bug 56246 after the instructions for the workaround:

    NOTE: This switches the compiler back to using the old default mcs compiler, and it will therefore generate the old style .mdb debugging symbol files rather than the new portable .pdb debugging symbol files. The old style .mdb debugging symbols might not behave 100% as expected with the Xamarin 15.2 release.

    At this time, the one known complete workaround would be to switch back to all of the Xamarin 15.1 Release versions, as listed on the Release Blog post for the Xamarin 15.2 release.

    Monday, May 15, 2017 6:42 PM
  • User35208 posted

    @ggammon I have found that breakpoints work for me in Xamarin Studio but not in Visual Studio for MAC.

    Monday, May 15, 2017 7:08 PM
  • User308644 posted

    Dears any workaround for Xamarin in Visual Studio ?!

    Tuesday, May 16, 2017 3:47 AM