Packaging a web application fails silently
See original GitHub issueThe scenario I am falling into requires me to develop plugins for a .NET Core web app. The plugins are standard NuGet packages. Some of the plugins require plenty of web related stuff and thus the plugin project’s SDK is of type Microsoft.NET.Sdk.Web
. It is also required to use the Web SDK in order to take advantage of Razor related stuff in Visual Studio (highlighting, intellisense, etc). - There was a bug somewhere tracking that issue but I had no luck finding it.
It seems that NuGet packages are not being generated for projects using the Web SDK.
Is this the result expected? If not, are you able to provide a workaround?
Steps to reproduce
- Create a web app using .NET Core 2.0 Preview 1 (no further modifications needed to reproduce)
- Right click the project and click “Package” or proceed to the folder containing the
csproj
file and execute commanddotnet pack
.
Expected behavior
NuGet package generated at .\bin\Debug
Actual behavior
No NuGet packages are generated. The dotnet pack
command produces the following output.
C:\Users\Coskun\Documents\Visual Studio 2017\Projects\WebApplication1\WebApplication1>dotnet pack
Microsoft (R) Build Engine version 15.3.117.23532
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Users\Coskun\Documents\Visual Studio 2017\Projects\WebApplication1\WebApplication1>
Environment data
dotnet --info
output:
C:\WINDOWS\system32>dotnet --info
.NET Command Line Tools (2.0.0-preview1-005977)
Product Information:
Version: 2.0.0-preview1-005977
Commit SHA-1 hash: 414cab8a0b
Runtime Environment:
OS Name: Windows
OS Version: 10.0.15063
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.0.0-preview1-005977\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0-preview1-002111-00
Build : 1ff021936263d492539399688f46fd3827169983
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
If it helps anyone else, if you have
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
(or an equivalent version) anywhere in your.csproj
then it’ll also skip generating packages, regardless of whether you have<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
@dasMulli This change was done for this bug fix - https://github.com/aspnet/websdk/issues/150