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
Product and Version Used: Roslynator 2022 v.4.1.2 - VS2022 17.4.1, Windows 10 Pro 21H2
Steps to Reproduce: 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. Also, seems to have the same underlying cause as this: https://community.sonarsource.com/t/ad0001-errors-system-io-filenotfoundexception-could-not-load-file-or-assembly-sonaranalyzer-cfg/71341/15 Someone in that thread mentioned the 'separate process' switch as a workaround. Sonar have now fixed their extension so I tried toggling the separate process back on and got this error message from Roslynator. Quite possible that this warning was happening before but the Sonar extension caused so many thousands of its warnings that I didn't notice the Roslynator one in the deluge.
Actual Behavior:
Warning AD0001 Analyzer 'Roslynator.CSharp.Analysis.ValueTypeObjectIsNeverEqualToNullAnalyzer' threw an exception of type 'System.IO.FileNotFoundException' with message 'Could not load file or assembly 'Roslynator.Core, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e'. The system cannot find the file specified.'.
System.IO.FileNotFoundException: Could not load file or assembly 'Roslynator.Core, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e'. The system cannot find the file specified.
File name: 'Roslynator.Core, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e'
---> System.IO.FileNotFoundException: Could not load file or assembly 'Roslynator.Core, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e'. The system cannot find the file specified.
File name: 'Roslynator.Core, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e'
---> System.IO.FileNotFoundException: Could not load file or assembly 'Roslynator.Core, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e'. The system cannot find the file specified.
File name: 'Roslynator.Core, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e'
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 Roslynator.CSharp.Analysis.ValueTypeObjectIsNeverEqualToNullAnalyzer.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)
Expected Behavior:
no error message
The text was updated successfully, but these errors were encountered:
No prob, glad to help, thank you for the Roslynator!
Malcolm Ellis
CTO
FileOpen Systems, Inc.
***@***.******@***.***>
831 706 2170 x103
From: Josef Pihrt ***@***.***>
Sent: Sunday, November 27, 2022 4:37 PM
To: JosefPihrt/Roslynator ***@***.***>
Cc: Malcolm Ellis ***@***.***>; Author ***@***.***>
Subject: Re: [JosefPihrt/Roslynator] 'System.IO.FileNotFoundException' with message 'Could not load file or assembly 'Roslynator.Core, Version=4.1.2.0 (Issue #1001)
Thanks for the report and for referencing the issue at Sonar. It helped me to fix the issue.
—
Reply to this email directly, view it on GitHub<#1001 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABGI75TSSALRU3SKSWTSC7LWKPIAJANCNFSM6AAAAAASMVYRRI>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
Product and Version Used: Roslynator 2022 v.4.1.2 - VS2022 17.4.1, Windows 10 Pro 21H2
Steps to Reproduce: 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. Also, seems to have the same underlying cause as this: https://community.sonarsource.com/t/ad0001-errors-system-io-filenotfoundexception-could-not-load-file-or-assembly-sonaranalyzer-cfg/71341/15 Someone in that thread mentioned the 'separate process' switch as a workaround. Sonar have now fixed their extension so I tried toggling the separate process back on and got this error message from Roslynator. Quite possible that this warning was happening before but the Sonar extension caused so many thousands of its warnings that I didn't notice the Roslynator one in the deluge.
Actual Behavior:
Warning AD0001 Analyzer 'Roslynator.CSharp.Analysis.ValueTypeObjectIsNeverEqualToNullAnalyzer' threw an exception of type 'System.IO.FileNotFoundException' with message 'Could not load file or assembly 'Roslynator.Core, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e'. The system cannot find the file specified.'.
System.IO.FileNotFoundException: Could not load file or assembly 'Roslynator.Core, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e'. The system cannot find the file specified.
File name: 'Roslynator.Core, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e'
---> System.IO.FileNotFoundException: Could not load file or assembly 'Roslynator.Core, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e'. The system cannot find the file specified.
File name: 'Roslynator.Core, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e'
---> System.IO.FileNotFoundException: Could not load file or assembly 'Roslynator.Core, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e'. The system cannot find the file specified.
File name: 'Roslynator.Core, Version=4.1.2.0, Culture=neutral, PublicKeyToken=926ea54d246a765e'
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 Roslynator.CSharp.Analysis.ValueTypeObjectIsNeverEqualToNullAnalyzer.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)Expected Behavior:
no error message
The text was updated successfully, but these errors were encountered: