-
-
Notifications
You must be signed in to change notification settings - Fork 256
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
.NET SDK 5: Could not load file or assembly Microsoft.CodeAnalysis #878
Comments
Hi, Thanks for creating new issue. Roslynator 4.0 requires Roslyn 4.0.1 (Microsoft.CodeAnalysis.dll and others). To use Roslynator analyzers you need one of following tools:
|
If you cannot use .NET SDK 6 for some reason you can use Roslynator.Analyzers 3.3.0 |
Thanks @josefpihrt, that's good to know. My apologies if I missed that in the documentation. I don't suppose there's a way to declare that in the package metadata to give users a more comprehensible error message? If there's nothing to fix here, feel free to close. |
So having updated the nuget packages might be why all Roslynator analyzers stopped working for me? Unity is on .NET 4.x, so I'm unable to use the latest release with it? I'm using Omnisharp with VSCode, latest version, which mentions this in the readme: I'm confused about .NET SDK vs just .NET though :/ I can confirm that reverting Roslynator to 3.3.0 fixed the issue: But I'd of course prefer to stay up to date :( |
Unity doesn't support Roslyn 4.x, but that's completely unrelated to the use of .NET Framework. Roslyn still ships net472 binaries with every build. This restriction is partially mentioned here in the Source Generators section: |
@sharwell I can't find a reference to Roslyn 4.x support on that Unity docs link, maybe this has since been updated? |
@marcospgp It's mentioned indirectly:
Source generators ( |
Roslynator analyzers now supports Roslyn 3.8 (see #1349) |
Creating a new issue similar (identical?) to #853, which was closed.
Product and Version Used:
Roslynator.Analyzers
4.0.0 and .NET SDK 5.0.404Steps to Reproduce: Run the following:
Actual Behavior: ~350 CS8032 warnings such as:
Expected Behavior: No CS8032 warnings.
The text was updated successfully, but these errors were encountered: