Closed ajcvickers closed 1 year ago
/cc @roji
Can't repro... Am I missing anything in the attempted repro below?
I also hit the same error yesterday.
Maybe different NuGet config? I am using:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="aspnetcore" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
<add key="servicing" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/3.1.103-servicing-014950/nuget/v3/index.json" />
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
Tried with this nuget.config, still no dice... Which SDK are you using? Can you post a repo that repros it?
@roji - Are you running in IDE?
I'm using this with the 3.1 SDK. Use build tool: /usr/share/dotnet/sdk/3.1.302/MSBuild.dll
@smitpatel I see it in Rider.
Tried both VS and cmdline... no warnings in build beyond what the analyzer produces. Here's what I'm using: https://github.com/roji/Test/tree/AnalyzerWarning, can you see if there are any differences or post your own?
@roji Looks like you're using the preview 7 SDK.
Yep. Switched to using the .NET 5 SDK we use for the efcore build and the warning goes away. So this is an issue with using the new package with the .NET 3.1 SDK.
Weird... switched to SDK 3.1.401 and I'm still getting nothing (cmdline or VS)... which precise version of the 3.1 SDK are you using? Can you put up a branch somewhere where I can use exactly what you're using?
@roji How would I create such a branch? The SDK is installed on the machine, not part of the repo. I posted the version being used above: 3.1.302
@roji The warning goes away when I update to the latest 3.1 SDK, so I think this can be closed. @smitpatel Any objections?
No objections.
Ah OK, now everything's clearer, thanks.
Create a new console app:
Build: