question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Packaging a web application fails silently

See original GitHub issue

The 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

  1. Create a web app using .NET Core 2.0 Preview 1 (no further modifications needed to reproduce)
  2. Right click the project and click “Package” or proceed to the folder containing the csproj file and execute command dotnet 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:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
jimmyheaddoncommented, Aug 16, 2020

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>

1reaction
vijayrkncommented, Jul 10, 2017

@dasMulli This change was done for this bug fix - https://github.com/aspnet/websdk/issues/150

Read more comments on GitHub >

github_iconTop Results From Across the Web

Packaging a web application fails silently · Issue #8405
Right click the project and click "Package" or proceed to the folder containing the csproj file and execute command dotnet pack .
Read more >
visual studio 2015 web deploy fail with no error message
A. I try to right-click/publish/web-deploy/preview/publish (everything is ok and message said "1 success").
Read more >
Installing Web Deploy with Desired State Configuration ...
I am working toward configuring a new Windows 2012 R2 instance to support our applications. Currently our applications are deployed using ...
Read more >
Debugging Web Applications: Errors and Troubleshooting
NET application running on a Web server, you may get this error message: Unable to start debugging on the Web server.
Read more >
Troubleshoot build errors and crashes
When a build fails with Task :app:bundleReleaseJsAndAssets FAILED (Android) or Metro encountered an error (iOS), it means Metro bundler was unable to bundle...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found