Search code examples
c#nuke-build

Nuke and update nuspec file


I generate a Nuget package with NUKE, now I need to set the repository url in the nuspec. But I can't figure out how. Is it possible? Or are there any other libraries that can do this?


Solution

  • Took a look at NuGet.Packaging and it appears to only have a nuspec reader I was unable to find a writer.

    Since NuSpec is just and XML File you can use XmlDocument to load and change the value. An Example of that was answered in this question: Change xml element values in c#