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

Publish Microsoft.CodeAnalysis.NetAnalyzers 7.0.4 #6878

Open
ChristofferGersen opened this issue Aug 21, 2023 · 5 comments
Open

Publish Microsoft.CodeAnalysis.NetAnalyzers 7.0.4 #6878

ChristofferGersen opened this issue Aug 21, 2023 · 5 comments
Assignees
Labels
Area-Infrastructure Priority:1 Very important to release, not a ship blocker
Milestone

Comments

@ChristofferGersen
Copy link

After updating to Visual Studio 17.7.1 I get the following build warning:

.nuget\packages\microsoft.codeanalysis.netanalyzers\7.0.3\build\Microsoft.CodeAnalysis.NetAnalyzers.targets(593,5): warning : The .NET SDK has newer analyzers with version '7.0.4' than what version '7.0.3' of 'Microsoft.CodeAnalysis.NetAnalyzers' package provides. Update or remove this package reference.

This is of course because I include the NuGet package to force all developers to use the same code analyzers, regardless of Visual Studio version. I would love to update the NuGet package to v7.0.4, but it has not been published yet, there is only a 7.0.4-preview1.23354.4 version. Can you please publish Microsoft.CodeAnalysis.NetAnalyzers 7.0.4 to NuGet? Just like it was done to resolve #6285 for 7.0.0 and #6502 for 7.0.1.

@Mek7
Copy link

Mek7 commented Aug 21, 2023

Can you also please synchronize with VS version releases so that this problem does recur again and again in the future?

@RobTF
Copy link

RobTF commented Aug 25, 2023

+1 This is an annoyance - it's fine to warn about analyser updates, but pointless to warn about non-existent versions (i.e. there is no 7.0.4 yet, only a preview, so we cannot address the warning). The preview packages should not be acknowledged by this warning.

@ChristofferGersen
Copy link
Author

The warning comes from .Net SDK 7.0.400, which claims to have a 7.0.4 version. I thought that it actually did contain said version, but that it just had not been published to NuGet yet. I did a little more digging and found out that the SDK actually includes the preview version. You can see this by looking at the version of C:\Program Files\dotnet\sdk\7.0.400\Sdks\Microsoft.NET.Sdk\analyzers\Microsoft.CodeAnalysis.NetAnalyzers.dll.

I also checked that .NET SDK 7.0.304 released with analyzers version 7.0.3-preview1.23267.1. I never found a similar issue about this version, but that is probably because the non-preview version was published to NuGet two days after .Net SDK 7.0.304 was released.

So perhaps the solution is to not release a .Net SDK with a preview version of the analyzers.

@mavasani
Copy link
Contributor

7.0.4 version of the package has been published and should soon be available on NuGet.org. Sorry for the inconvenience caused here.

Assigning this issue to @carlossanlop @buyaa-n to ensure that we publish the release version of the analyzer Nuget package at the same time as releasing a new .NET SDK release/patch OR remove this MSBuild warning recommending upgrade altogether.

@mavasani mavasani added Area-Infrastructure Priority:1 Very important to release, not a ship blocker labels Aug 28, 2023
@mavasani mavasani added this to the .NET vNext milestone Aug 28, 2023
@ndsvw
Copy link

ndsvw commented Aug 31, 2023

BTW: You can disable these warnings via this in your csproj/props file:

<_SkipUpgradeNetAnalyzersNuGetWarning>true</_SkipUpgradeNetAnalyzersNuGetWarning>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure Priority:1 Very important to release, not a ship blocker
Projects
None yet
Development

No branches or pull requests

7 participants