Open sitty opened 3 years ago
Where are you seeing this warning? Is it in VS or .NET CLI? If so, can you share which version of the tool you're using?
I get the warnings in VS and in command line when running dotnet build. I'm using version 0.2.217201+d343ba735920891597ff387f9445430b478cf267 When I build the project in Release configuration some of these warnings show up are errors.
@sitty, does the .csproj files have any PackageReference
with microsoft.dotnet.upgradeassistant.*?
Yes it does
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.2.217201">
@sitty which version of VS? Sounds like we may be using too late of a version of the code analysis library when run in VS.
Upgrade Assistant will add the analyzers to your project. If you are done with them, feel free to remove them. We could look at removing them as well. However, if we were to downgrade which of code analysis library we use, they should run with no problem in VS/CLI and you won't know the difference.
I'm using Visual Studio 16.8.5
Cool. So some action items for us to explore:
Either would solve the issue you raised, but probably should do both.
I can try to upgrade VS to16.9.2 and retry. I'm also getting the same warnings upon running dotnet build from terminal.
We're using the latest code analysis libraries at the moment, which may be ahead of where the CLI/VS is even at. I'm interested to hear the results, though, to verify
I tested with VS 16.9.3 and I don't get these warnings.
Ok - so we should look at downgrading some of our analyzer dependencies so that doesn't show up for people
@twsouthwick Going to follow-up with Roslyn team on what version to downgrade to.
I was going to report this as an issue, I too found it odd that a <PackageReference>
that was added for part of the upgrade was left behind after the upgrade was successful. I believe it should be removed.
What should be done with Microsoft.Dotnet.UpgradeAssistant.Extenstions.Default.Analyzers package after upgrade? Is it supposed to be removed? I completed upgrade of a class library and now I several warnings from different Analyzers like these Warning CS8032 An instance of analyzer Microsoft.DotNet.UpgradeAssistant.Extensions.Default.CSharp.Analyzers.AllowHtmlAttributeAnalyzer cannot be created from C:\Users\xxxx.nuget\packages\microsoft.dotnet.upgradeassistant.extensions.default.analyzers\0.2.217201\analyzers\dotnet\cs\Microsoft.DotNet.UpgradeAssistant.Extensions.Default.CSharp.Analyzers.dll: Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.