You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using v 2.6 with VS2022 17.4.1, Windows 10 Pro 21H2
I suspect this is the same issue as this: https://community.sonarsource.com/t/ad0001-errors-system-io-filenotfoundexception-could-not-load-file-or-assembly-sonaranalyzer-cfg/71341/15 and also Roslynator 2022: dotnet/roslynator#1001. As I reported there, based on the Sonar issue thread, it seems to be tied to whether the VS setting (text editor/c#/advanced) 'run code analysis in separate process' is on, and that the last update of VS 2022 turned that 'on' by default. Switching that off stops the error. Sonar and Roslynator are fixed, not sure why this one cropped up days later but hopefully there's enough info in those cases to figure out a fix.
Stack trace starts like this:
AD0001 Analyzer 'ParallelChecker.ParallelAnalyzer' threw an exception of type 'System.TypeInitializationException' with message 'The type initializer for 'ParallelChecker.ParallelAnalyzer' threw an exception.'.
System.TypeInitializationException: The type initializer for 'ParallelChecker.ParallelAnalyzer' threw an exception.
---> System.IO.FileNotFoundException: Could not load file or assembly 'ConcurrencyLab.ParallelChecker.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=134bc2708d917588'. The system cannot find the file specified.
File name: 'ConcurrencyLab.ParallelChecker.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=134bc2708d917588'
---> System.IO.FileNotFoundException: Could not load file or assembly 'ConcurrencyLab.ParallelChecker.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=134bc2708d917588'. The system cannot find the file specified.
File name: 'ConcurrencyLab.ParallelChecker.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=134bc2708d917588'
---> System.IO.FileNotFoundException: Could not load file or assembly 'ConcurrencyLab.ParallelChecker.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=134bc2708d917588'. The system cannot find the file specified.
File name: 'ConcurrencyLab.ParallelChecker.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=134bc2708d917588'
at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName)
at Microsoft.ServiceHub.HostLib.ServiceLoadContext.Load(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName)
at Microsoft.CodeAnalysis.DefaultAnalyzerAssemblyLoader.DirectoryLoadContext.Load(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
at ParallelChecker.ParallelAnalyzer..cctor()
--- End of inner exception stack trace ---
at ParallelChecker.ParallelAnalyzer.get_SupportedDiagnostics()
at Microsoft.CodeAnalysis.Diagnostics.AnalyzerManager.AnalyzerExecutionContext.<>c__DisplayClass20_0.b__0(Object _)
at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock[TArg](DiagnosticAnalyzer analyzer, Action1 analyze, TArg argument, Nullable1 info)
The text was updated successfully, but these errors were encountered:
Thank you very much. Unfortunately, this is a problem with the latest VS 2022 version 17.4.2. I am working on a fix, by redesigning at the same time the analysis process, cf. branch https://github.com/blaeser/parallelchecker/tree/luc%2Fnew_release. I hope to have a new release soon.
Using v 2.6 with VS2022 17.4.1, Windows 10 Pro 21H2
I suspect this is the same issue as this: https://community.sonarsource.com/t/ad0001-errors-system-io-filenotfoundexception-could-not-load-file-or-assembly-sonaranalyzer-cfg/71341/15 and also Roslynator 2022: dotnet/roslynator#1001. As I reported there, based on the Sonar issue thread, it seems to be tied to whether the VS setting (text editor/c#/advanced) 'run code analysis in separate process' is on, and that the last update of VS 2022 turned that 'on' by default. Switching that off stops the error. Sonar and Roslynator are fixed, not sure why this one cropped up days later but hopefully there's enough info in those cases to figure out a fix.
Stack trace starts like this:
AD0001 Analyzer 'ParallelChecker.ParallelAnalyzer' threw an exception of type 'System.TypeInitializationException' with message 'The type initializer for 'ParallelChecker.ParallelAnalyzer' threw an exception.'.
System.TypeInitializationException: The type initializer for 'ParallelChecker.ParallelAnalyzer' threw an exception.
---> System.IO.FileNotFoundException: Could not load file or assembly 'ConcurrencyLab.ParallelChecker.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=134bc2708d917588'. The system cannot find the file specified.
File name: 'ConcurrencyLab.ParallelChecker.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=134bc2708d917588'
---> System.IO.FileNotFoundException: Could not load file or assembly 'ConcurrencyLab.ParallelChecker.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=134bc2708d917588'. The system cannot find the file specified.
File name: 'ConcurrencyLab.ParallelChecker.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=134bc2708d917588'
---> System.IO.FileNotFoundException: Could not load file or assembly 'ConcurrencyLab.ParallelChecker.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=134bc2708d917588'. The system cannot find the file specified.
File name: 'ConcurrencyLab.ParallelChecker.Core, Version=2.6.0.0, Culture=neutral, PublicKeyToken=134bc2708d917588'
at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName)
at Microsoft.ServiceHub.HostLib.ServiceLoadContext.Load(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName)
at Microsoft.CodeAnalysis.DefaultAnalyzerAssemblyLoader.DirectoryLoadContext.Load(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName)
at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
at ParallelChecker.ParallelAnalyzer..cctor()
--- End of inner exception stack trace ---
at ParallelChecker.ParallelAnalyzer.get_SupportedDiagnostics()
at Microsoft.CodeAnalysis.Diagnostics.AnalyzerManager.AnalyzerExecutionContext.<>c__DisplayClass20_0.b__0(Object _)
at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock[TArg](DiagnosticAnalyzer analyzer, Action
1 analyze, TArg argument, Nullable
1 info)The text was updated successfully, but these errors were encountered: