-
Notifications
You must be signed in to change notification settings - Fork 266
Open
Labels
Area:PackageSourceMappingIssues related to the package source mapping featureIssues related to the package source mapping featureCategory:Quality WeekIssues that should be considered for quality weekIssues that should be considered for quality weekFunctionality:RestorePriority:2Issues for the current backlog.Issues for the current backlog.Type:Bug
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.csprojsdk 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
test01folder, create anuget.configfile:
<?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.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area:PackageSourceMappingIssues related to the package source mapping featureIssues related to the package source mapping featureCategory:Quality WeekIssues that should be considered for quality weekIssues that should be considered for quality weekFunctionality:RestorePriority:2Issues for the current backlog.Issues for the current backlog.Type:Bug