Xamarin iOS & Mac - 编译器崩溃,代码:1

Xamarin iOS & Mac - Compiler crashed with code: 1

突然间,我的所有 Xamarin 项目都因上述编译错误而停止构建。我还尝试为 Mac 重新安装 XS 和 VS,但没有任何帮助。

这是我得到的构建输出:

CustomDialogController.designer.cs(16,22): warning CS0114: 'CustomDialogController.Description' hides inherited member 'NSObject.Description'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
CustomDialogController.designer.cs(19,22): warning CS0114: 'CustomDialogController.Title' hides inherited member 'NSViewController.Title'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.

    Unhandled Exception:
    System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
      at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
      at Microsoft.Cci.FullMetadataWriter+DefinitionIndex`1[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.Func`1[TResult] getPeStream, System.Func`1[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.Func`1[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.Func`2[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.IEnumerable`1[T] originalArguments, Microsoft.CodeAnalysis.BuildPaths buildPaths, System.IO.TextWriter textWriter) [0x0009d] in <0b73f303db124699a9f415aa972a6e9f>:0 
      at Microsoft.CodeAnalysis.CommandLine.DesktopBuildClient.Run (System.Collections.Generic.IEnumerable`1[T] arguments, System.Collections.Generic.IEnumerable`1[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.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
      at Microsoft.Cci.FullMetadataWriter+DefinitionIndex`1[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.Func`1[TResult] getPeStream, System.Func`1[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.Func`1[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.Func`2[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.IEnumerable`1[T] originalArguments, Microsoft.CodeAnalysis.BuildPaths buildPaths, System.IO.TextWriter textWriter) [0x0009d] in <0b73f303db124699a9f415aa972a6e9f>:0 
      at Microsoft.CodeAnalysis.CommandLine.DesktopBuildClient.Run (System.Collections.Generic.IEnumerable`1[T] arguments, System.Collections.Generic.IEnumerable`1[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.1/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/danielmartin/ownCloud/Programming/Lama/Lama.Mac/Lama.Mac.csproj".-- FAILED

Done building project "/Users/danielmartin/ownCloud/Programming/Lama/Lama.Mac/Lama.Mac.csproj".-- FAILED

Build FAILED.

Warnings:

     /Users/danielmartin/ownCloud/Programming/Lama/Lama.Mac/Lama.Mac.csproj (Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.Common.targets (_CoreCompileInterfaceDefinitions target) ->

Main.storyboard: ibtool warning : Automatic preferred width mode for static wrapping text before OS X 10.11, use Explicit or First Runtime Layout Width
Main.storyboard: ibtool warning : Automatic preferred width mode for static wrapping text before OS X 10.11, use Explicit or First Runtime Layout Width
Main.storyboard: ibtool warning : Distribution before OS X 10.11
Main.storyboard: ibtool warning : Detaches Hidden Views before OS X 10.11
Main.storyboard: ibtool warning : “View Controller“ is unreachable because it has no entry points, and no identifier for runtime access via -[NSStoryboard instantiateControllerWithIdentifier:]

/Users/danielmartin/ownCloud/Programming/Lama/Lama.Mac/Lama.Mac.csproj (Build) ->
/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->

CustomDialogController.designer.cs(16,22): warning CS0114: 'CustomDialogController.Description' hides inherited member 'NSObject.Description'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
CustomDialogController.designer.cs(19,22): warning CS0114: 'CustomDialogController.Title' hides inherited member 'NSViewController.Title'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.

Errors:

/Users/danielmartin/ownCloud/Programming/Lama/Lama.Mac/Lama.Mac.csproj (Build) ->
 /Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->

/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets: error : Compiler crashed with code: 1.

 7 Warning(s)
 1 Error(s)

希望有人知道这里出了什么问题并能帮助我

谢谢!

解决方案

稍作尝试后,我发现安装较低版本的 Mono Framework 确实有帮助。试试5.0以下的版本