Creating nuget package using dotnet pack command and <NuspecFile> tag creates a package targeting .Net Framework #7825
Labels
Functionality:Pack
Priority:3
Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog.
Product:dotnet.exe
Milestone
From @shai-glat on February 21, 2019 12:44
Steps to reproduce
<PropertyGroup> <NuspecFile>nuspec\MyProj.nuspec</NuspecFile> </PropertyGroup>
files
tag to nuspec file as follows:dotnet pack MyProj.csproj -o out /p:Version=1.0.1
Expected behavior
Generated package is a valid .NET Core package
Actual behavior
Package contents are all .NET Core dlls, but when adding the package visual studio it states the package was restored using .NetFramework 4.6 instead of .Net Core 2.1
Environment data
dotnet --info
output:.NET Core SDK (reflecting any global.json):
Version: 2.2.101
Commit: 236713b0b7
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17134
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.2.101\
Host (useful for support):
Version: 2.2.0
Commit: 1249f08fed
.NET Core SDKs installed:
2.1.201 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.500 [C:\Program Files\dotnet\sdk]
2.1.502 [C:\Program Files\dotnet\sdk]
2.2.101 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Additional notes
I had the same problem when adding NuspecFile via dotnet CLI, as well as when i started with an empty nuspec file and simply added the files tag as stated above
Copied from original issue: dotnet/cli#10861
The text was updated successfully, but these errors were encountered: