How do I create a NuGet package from a project file so it includes the necessary assemblies?

StackOverflow https://stackoverflow.com/questions/9073796

  •  05-12-2019
  •  | 
  •  

質問

To generate a NuGet package I'm currently using the command:

nuget pack project.csproj -Prop Configuration=Release

which I expected would package up the files in the bin\Release folder, i.e. the result of building the project. This folder has several MB of assemblies, however the nupkg file that gets created is only 7kb, which doesn't seem to include any of these files.

I'm running the nuget command from TeamCity so I'm trying to avoid manually editing a nuspec file.

What is the best way to package a project like this using NuGet?

役に立ちましたか?

解決

TeamCity 7.0 is finally here and it has its own NuGet server built in. You can simply ask it to take care of your packages whether you want to publish it locally or/and to nuget.org

TeamCity and NuGet

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top