tag:help.appveyor.com,2012-11-13:/discussions/questions/7579-how-to-create-the-nuget-spec-file-dynamicallyAppVeyor: Discussion 2018-10-19T08:18:28Ztag:help.appveyor.com,2012-11-13:Comment/432557492017-08-21T21:46:37Z2017-08-21T21:46:37Zhow to create the nuget spec file dynamically<div><p>We do not have it built-in, but you can script it with PowerShell (assuming <code>APPVEYOR_PROJECT_SLUG</code> is a good ID, but sure you can use variable or value you like more):</p>
<pre>
<code>before_build:
- cmd: nuget spec proj1
- ps: |
$xmlPath = "$env:APPVEYOR_BUILD_FOLDER\proj1\proj1.nuspec"
$xml = [xml](get-content $xmlPath)
$xml.package.metadata.id = $env:APPVEYOR_PROJECT_SLUG
$xml.Save($xmlPath)</code>
</pre></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/432557492017-08-22T21:14:47Z2017-08-22T21:14:47Zhow to create the nuget spec file dynamically<div><p>Thanks</p></div>joel.mccune