The compiler crashes when using the analyzers in Microsoft.CodeAnalysis.Analyzers in the 1.0.0-rc1 release in ctp 6 because of a missing resources dll. This was reproduced when trying to build this tree. The cause was that this analyzer did not have a DiagnosticAnalyzerAttribute.
Stacktrace:
Application: VBCSCompiler.exe
Framework Version: v4.0.30319
Description: The application requested process termination through System.Environment.FailFast(string message).
Message: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CodeAnalysis.Analyzers.resources, Version=1.0.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.CodeAnalysis.Analyzers.resources, Version=1.0.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35' ---> System.IO.FileNotFoundException: Could not find file 'C:\Users\Administrator\Source\Repos\StyleCopAnalyzers\packages\Microsoft.CodeAnalysis.Analyzers.1.0.0-rc1\tools\analyzers\Microsoft.CodeAnalysis.Analyzers.resources.dll'.
File name: 'C:\Users\Administrator\Source\Repos\StyleCopAnalyzers\packages\Microsoft.CodeAnalysis.Analyzers.1.0.0-rc1\tools\analyzers\Microsoft.CodeAnalysis.Analyzers.resources.dll'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)
at Microsoft.CodeAnalysis.Diagnostics.AnalyzerFileReference.InMemoryAssemblyLoader.LoadCore(String fullPath)
at Microsoft.CodeAnalysis.Diagnostics.AnalyzerFileReference.InMemoryAssemblyLoader.CurrentDomain_AssemblyResolve(Object sender, ResolveEventArgs args)
at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(String name, CultureInfo culture, Version version, Boolean throwOnFileNotFound, StackCrawlMark& stackMark)
at System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(CultureInfo lookForCulture, StackCrawlMark& stackMark)
at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at Microsoft.CodeAnalysis.LocalizableResourceString.ToString(IFormatProvider formatProvider)
at Microsoft.CodeAnalysis.DiagnosticFormatter.Format(Diagnostic diagnostic, IFormatProvider formatter)
at Microsoft.CodeAnalysis.CommonCompiler.PrintErrors(IEnumerable`1 diagnostics, TextWriter consoleOutput)
at Microsoft.CodeAnalysis.CommonCompiler.RunCore(TextWriter consoleOutput, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.CommonCompiler.Run(TextWriter consoleOutput, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.CSharp.CSharpCompiler.Run(TextWriter consoleOutput, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.CompilerServer.CSharpCompilerServer.Run(TextWriter consoleOutput, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.CompilerServer.CSharpCompilerServer.RunCompiler(String responseFileDirectory, String[] args, String baseDirectory, String libDirectory, TextWriter output, CancellationToken cancellationToken, Boolean& utf8output)
at Microsoft.CodeAnalysis.CompilerServer.CompilerRequestHandler.CSharpCompile(String currentDirectory, String libDirectory, String responseFileDirectory, String[] commandLineArguments, TextWriter output, CancellationToken cancellationToken, Boolean& utf8output)
at Microsoft.CodeAnalysis.CompilerServer.CompilerRequestHandler.CSharpCompile(BuildRequest req, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.CompilerServer.CompilerRequestHandler.HandleRequest(BuildRequest req, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.CompilerServer.ServerDispatcher.Connection.<>c__DisplayClass0.<ServeBuildRequest>b__1()
Stack:
at System.Environment.FailFast(System.String, System.Exception)
at Microsoft.CodeAnalysis.FatalError.Report(System.Exception, System.Action`1<System.Exception>)
at Microsoft.CodeAnalysis.FatalError.Report(System.Exception)
at Microsoft.CodeAnalysis.CompilerServer.ServerDispatcher+Connection+<>c__DisplayClass0.<ServeBuildRequest>b__1()
at System.Reflection.RuntimeAssembly._nLoad(System.Reflection.AssemblyName, System.String, System.Security.Policy.Evidence, System.Reflection.RuntimeAssembly, System.Threading.StackCrawlMark ByRef, IntPtr, Boolean, Boolean, Boolean)
at System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(System.String, System.Globalization.CultureInfo, System.Version, Boolean, System.Threading.StackCrawlMark ByRef)
at System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(System.Globalization.CultureInfo, System.Threading.StackCrawlMark ByRef)
at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(System.Globalization.CultureInfo, System.Collections.Generic.Dictionary`2<System.String,System.Resources.ResourceSet>, Boolean, Boolean, System.Threading.StackCrawlMark ByRef)
at System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo, Boolean, Boolean, System.Threading.StackCrawlMark ByRef)
at System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo, Boolean, Boolean)
at System.Resources.ResourceManager.GetString(System.String, System.Globalization.CultureInfo)
at Microsoft.CodeAnalysis.LocalizableResourceString.ToString(System.IFormatProvider)
at Microsoft.CodeAnalysis.DiagnosticFormatter.Format(Microsoft.CodeAnalysis.Diagnostic, System.IFormatProvider)
at Microsoft.CodeAnalysis.CommonCompiler.PrintErrors(System.Collections.Generic.IEnumerable`1<Microsoft.CodeAnalysis.Diagnostic>, System.IO.TextWriter)
at Microsoft.CodeAnalysis.CommonCompiler.RunCore(System.IO.TextWriter, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.CommonCompiler.Run(System.IO.TextWriter, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.CSharp.CSharpCompiler.Run(System.IO.TextWriter, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.CompilerServer.CSharpCompilerServer.Run(System.IO.TextWriter, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.CompilerServer.CSharpCompilerServer.RunCompiler(System.String, System.String[], System.String, System.String, System.IO.TextWriter, System.Threading.CancellationToken, Boolean ByRef)
at Microsoft.CodeAnalysis.CompilerServer.CompilerRequestHandler.CSharpCompile(System.String, System.String, System.String, System.String[], System.IO.TextWriter, System.Threading.CancellationToken, Boolean ByRef)
at Microsoft.CodeAnalysis.CompilerServer.CompilerRequestHandler.CSharpCompile(Microsoft.CodeAnalysis.CompilerServer.BuildRequest, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.CompilerServer.CompilerRequestHandler.HandleRequest(Microsoft.CodeAnalysis.CompilerServer.BuildRequest, System.Threading.CancellationToken)
at Microsoft.CodeAnalysis.CompilerServer.ServerDispatcher+Connection+<>c__DisplayClass0.<ServeBuildRequest>b__1()
at System.Threading.Tasks.Task`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
The compiler crashes when using the analyzers in Microsoft.CodeAnalysis.Analyzers in the 1.0.0-rc1 release in ctp 6 because of a missing resources dll. This was reproduced when trying to build this tree. The cause was that this analyzer did not have a DiagnosticAnalyzerAttribute.
Stacktrace:
So there are two problems: