If you need to constantly update your nuspec file, it is really just an XML file (as I am sure you know), so there are some very good tools you can use from MSBuild to automate nuspec / update creation. From the command line, MSBuild provides several tasks that can update or transform XML, and I used the MSBuild community tasks to configure the original nuspec. For example, by default, nuspec contains several rows with a broiler table that I do not need, so I use XmlUpdate tasks to delete them.
Although I have not looked at the csproj file for links without links, I think this is possible with a little research. Here are some links to blog posts that describe my experience with NuGet automation, which can help you get started:
Creating packages with NuGet using MSBuild - This article contains some basic NuSpec updates, because the described package is no different from the type of package NuGet already knows how to automate.
Managing MEF Parts with Nuget - This article includes some more complex updates to support the distribution of MEF parts as run-only links.
If you plan to do this a lot, donβt want to mess with MSBuild, or just want to return the behavior you liked from the version of ProjectFactory.cs until 1360, NuGet supports third-party extension through MEF. You can go into the original control and get the earlier code that you like and create a custom command (like custompack ) that provides this behavior. Then you can use it from the command line as follows:
nuget custompack MyProject.csproj -Property Configuration=Release
I think this is a really cool aspect of NuGet, but I haven't played with it myself yet. Here is an article explaining how to do this:
Extend NuGet Command Prompt
So, although David mentioned that NuGet is not intended to support this scenario, if the scenario is right for you, you can go this route to expand NuGet to suit your needs.