sdk: dotnet pack does not produce package on net core 2.0.0 web project
Steps to reproduce
Install net core 2.0.0 sdk Create a basic Web project with net461 target framework and referencing AspNetCore 2.0.0 Execute the dotnet pack myproject.csproj
Expected behavior
A nupkg is generated
Actual behavior
nothing is produced. Before I migrate to 2.0.0, packages were normally produced locally and with TFS builds
Environment data
dotnet --info output:
Product Information:
Version: 2.0.0
Commit SHA-1 hash: cdcd1928c9
Runtime Environment: OS Name: Windows OS Version: 6.1.7601 OS Platform: Windows RID: win7-x64 Base Path: C:\Program Files\dotnet\sdk\2.0.0\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0 Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (8 by maintainers)
Web projects are now marked as not packable by default. You can change that by adding the following property to the csproj:
I completely agree that pack shouldn’t silently do nothing when IsPackable=false. I suggest logging an issue on https://github.com/nuget/home. cc @rohit21agrawal
I’d tried your solution and it works now. <IsPackable> rocks 😃
But I still don’t know why putting this behavior by default cause it’s absolutely impossible to know why a package is not created by calling dotnet pack on a web project while the same command on an assembly project does produce a package. There’'s nothing on the output of the command which indicates that it’s normal that nothing is produced. At least create an information message to let the developer know that nothing gonna happen
@marcusien: @dasMulli is correct. This is by design and implemented by https://github.com/aspnet/websdk/pull/165
cc @davidfowl @mlorbetske @davidfowl