I am using the csproj property <GeneratePackageOnBuild>
to generate a NuGet package from my netstandard2.0 C# project.
I would like to make 2 modifications to the generated package
The only way I could figure out to accomplish that was to add a custom .nuspec file to my project, and add <NuspecFile>
to the .csproj.
This works fine, but I'm missing some features from the auto-generated NuGet package, like repository binding to my git commit. It also feels less resilient to change.
Is there any way I can modify the SDK build process to get the auto-generated NuGet package, but with my 2 changes?
Thanks to @Pieterjan, I found the right answer.
Including referenced project DLLs in nuget package [.Net Core RC3 *.csproj file]
pointed me to
https://github.com/nuget/home/issues/3891#issuecomment-377319939
so I was able to
<Target Name="MyProj_RenamePackageId" BeforeTargets="GenerateNuspec"