Open
Description
NuGet Product Used
dotnet.exe, Visual Studio Package Management UI
Product Version
8.0.300
Worked before?
unknown
Impact
Other
Repro Steps & Context
- Clear all caches:
dotnet nuget locals all -c
- Create a library:
dotnet new classlib -o test01
- Change the
test01.csproj
sdk to beSdk="MSTest.Sdk/3.3.1"
- In
%appdata%\NuGet\NuGet.Config
. add the following mapping:
<packageSource key="nuget.org">
<package pattern="System.*" />
</packageSource>
- In the
test01
folder, create anuget.config
file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
- In
classlib01
, rundotnet restore
Notice that if the custom nuget.config
file added in the project folder is removed or the duplicate nuget.org source is removed, the restore succeeds.
Verbose Logs
D:\temp\test01\test01.csproj : error : Could not resolve SDK "MSTest.Sdk". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that message to correctly specify the SDK.
D:\temp\test01\test01.csproj : error : SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" returned null.
D:\temp\test01\test01.csproj : error : Unable to resolve 'MSTest.Sdk (= 3.3.1)' for '.NETStandard,Version=v0.0'. PackageSourceMapping is enabled, the following source(s) were not considered: Microsoft Visual Studio Offline Packages, NuGet official package source.
D:\temp\test01\test01.csproj : error MSB4236: The SDK 'MSTest.Sdk' specified could not be found.