The documentation seems to be really incomplete. All it says is that you can use your own .nuspec file, but it makes no mention of where you're supposed to put it, or how to get octopack to use it.
http://docs.octopusdeploy.com/display/OD/Using+OctoPack
I've tried naming the .nuspec file the same thing that my solution is named and having it in the same directory. That didn't work.
I've tried modifying the .nuspec file that Octopack generates, but those changes just get overwritten every time I run it.
Everything else I try is just a shot in the dark.
Has anyone gotten this to work?
If you want to use a custom nuspec file (something different than your.project.name.nuspec
, there is a msbuild property OctoPackNuSpecFileName
, through wich you can specify your nuspec file, like this:
msbuild yoursolution.sln /p:RunOctoPack=true p:OctoPackNuSpecFileName=Dev.nuspec
Another way to use a custom or conditional .nuspec file with OctoPack is by adding a PropertyGroup to your .csproj file, like this:
<PropertyGroup>
<RunOctoPack>true</RunOctoPack>
</PropertyGroup>
<PropertyGroup>
<OctoPackNuSpecFileName Condition="'$(Configuration)' == 'Release'">MyApp.nuspec</OctoPackNuSpecFileName>
<OctoPackNuSpecFileName Condition="'$(Configuration)' != 'Release'">MyApp.Debug.nuspec</OctoPackNuSpecFileName>
</PropertyGroup>
Put the files MyApp.nuspec and MyApp.Debug.nuspec in the same directory as your .csproj file and you are good to go.
blerg.
I'm a dummy.
The .nuspec file needs to be in the same directory as the .csproj file. This actually makes sense because it allows you to have a different nuspec file for each project in your solution.
Hopefully this post helps someone else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With