-
Notifications
You must be signed in to change notification settings - Fork 7
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
NSubstitute.Analyzers.CSharp produces warnings about Microsoft.CodeAnalysis.CSharp in project, no analyzer output #77
Comments
Hi @erizzo, thanks for reporting. I will try to take a look, however, I don't have access to this particular version on Visual Studio. I will take a look if this issue occurs on the one I own (15.7.6) and will get back to you @dtchepak can you move this issue to NSubstitute.Analyzers repository? GitHub should be able to do this by now (but it seems I cant do it on my own) |
Thanks. I apologize for not noticing there was a separate repo for the analyzers. |
@erizzo I did some digging and also asked on Roslyn gitter channel, and I am afraid I don't have good news. NSubstitute.Analyzers from the very first stable version depends on <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.8.2" PrivateAssets="all" /> This is the package which provides the Roslyn goodies thanks to which we are able to analyze c# code, report diagnostic etc. When the analyzer is added to project, this dependency is provided by VisualStudio itself - not by a NuGet reference/dependency. VisualStudio is shipped together with specific Roslyn version, the mapping between them is listed here. So as you can see from the link above you need Visual Studio 2017 version 15.7 or higher in order to make them work. |
@erizzo Thanks for taking the time to raise the issue! Logging it in the other repo isn't a problem -- we'd much prefer to have a record of the issue than have people be put off trying to decide which repo it should go in! :) @zvirja Thanks for moving this. @tpodolak Seems like you've already found the issue. I did find the same message mentioned in this issue, but not sure how comparable that is. |
Question
I have an ordinary Test project in my solution, targeting .Net Framework 4.6.2. When I added a Nuget reference to NSubstitute.Analyzers.CSharp, I got several warnings like this:
I then tried adding Nuget reference to Microsoft.CodeAnalysis.CSharp (I tried both 2.8.0 and the latest stable version, 2.10.0), but it made no difference.
Obviously, the NSubstitute analyzers are not producing any warnings, either.
Any ideas what I can do?
VisualStudio version is 15.6.7 (VS 2017)
The text was updated successfully, but these errors were encountered: