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.

dotnet pack does not produce nupkg for webapi project

See original GitHub issue

Steps to reproduce

dotnet new webapi dotnet pack

Expected behavior

nupkg should be generated for project

Actual behavior

build succeeds, but nupkg is not generated for project

Environment data

dotnet --info output:

.NET Command Line Tools (2.0.0)

Product Information: Version: 2.0.0 Commit SHA-1 hash: cdcd1928c9

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\

Microsoft .NET Core Shared Framework Host

Version : 2.0.0 Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dasMullicommented, Sep 20, 2017

I was referring to this document: https://octopus.com/docs/guides/deploying-asp.net-core-web-applications

# Publish the application to a folder
dotnet publish source/MyApp.Web --output published-app --configuration Release

# Package the folder into a ZIP
octo pack --id MyApp.Web --version 1.0.0 --basePath published-app 

Problem is that ASP.NET Core applications need a special handling here (in contrast to e.g. a .NET Core console application). Also, you would want MVC precompilation to be performed which is only done during publish.

It may be beneficial to follow up with octopus deploy on their recommendations and documentation.

0reactions
srini89commented, Mar 5, 2018

@KellyR-STCU : thanks for the response .So we are not able to do with Nuget packages ?

I am pretty new to this tool can give me some idea how did you use octopack.exe and dotnet publish on the same agent? and did we unzip in octopus deploy to open the files on IIS?

Read more comments on GitHub >

github_iconTop Results From Across the Web

asp.net - DotNet Pack Not Doing Anything
I am trying to create a nuget package for my web application but it is not producing any .nupkg outputs. I am using...
Read more >
dotnet pack command - .NET CLI
The dotnet pack command builds the project and creates NuGet packages. The result of this command is a NuGet package (that is, a...
Read more >
How YOU can create reusable packages for .NET Core ...
NuGet package creation, here we will create a NuGet by using a terminal command; Install your package locally, we want to ensure that...
Read more >
Create NuGet Package and Publish in Dotnet Core - Blog of Pi
A step by step guide on how to create and publish nuget package. It also talks about how to publish the package to...
Read more >
Creating a Nuget Package From a .Net 6 class library
I decided to create a nuget package of the code that we could host in our Azure artifacts nuget feed. If you don't...
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