Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.IO.FileNotFoundException: Could not load file or assembly 'ConcurrencyLab.ParallelChecker.Core, Version=2.6.0.0 #2

Closed
MalcolmEllis opened this issue Dec 8, 2022 · 2 comments
Assignees
Labels
bug Something isn't working VS compatibility

Comments

@MalcolmEllis
Copy link

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)

@blaeser
Copy link
Owner

blaeser commented Dec 8, 2022

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.

@blaeser blaeser self-assigned this Dec 8, 2022
@blaeser blaeser added bug Something isn't working VS compatibility labels Dec 8, 2022
@blaeser
Copy link
Owner

blaeser commented Dec 11, 2022

This should be now fixed with the latest 2.7.0 release of Parallel Checker.
https://marketplace.visualstudio.com/items?itemName=LBHSR.ParallelChecker

Thank you again for reporting this issue.

@blaeser blaeser closed this as completed Dec 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working VS compatibility
Projects
None yet
Development

No branches or pull requests

2 participants