Reputation: 10509
When I have a .csproj class library project, it already has some NuGet Dependencies and output files. (At least ProjectName.dll).
I've learned that I need to create a .nuspec file (as one of the steps) in order to publish the NuGet Package to a global repository.
.nuspec file will include metadata for the project + dependencies (another NuGet Packages) that are added along with my NuGet Package.
Is the a way (a tool, an app) that will automatically generate a .nuspec file for me, to include at least the dependencies, so I don't have to manually get an ID of each one and put then into .xml?
Upvotes: 4
Views: 2219
Reputation: 47907
Generating a .nuspec file based on your project is not supported by NuGet.exe but you could write one. I do not know of anything that does this. However did you look at using the nuget pack command line?
nuget pack YourProject.csproj
This will generate your NuGet package file (.nupkg) and automatically add any dependencies for NuGet packages your project references.
You can include extra metadata in your .nuspec or just use the metadata in your compiled project binary.
Upvotes: 5