Creating a nuget library with octopus deploy

We have a shared library between multiple projects we want to use. I don’t want a post-build event to copy/move the files to ${OutputDirectory}\lib*.dll. It would make more sense imo just to do the translation within octopack to move everything in the output directory to an output of lib with a nuspec file.

I am using Octopack to build the nuget. Then pushing to our nuget server, not to octopus deploy like I would a web application.

However, I don’t want to define the version in the nuspec and instead want it to be defined by the team city build number. Is there a way to do that?

<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="">
      <title>Titan Shared Nuget</title>
     <version>{Can I put the octopus version number here somehow?}</version>
      <authors>Titan Dev Team</authors>
      <owners>Titan Dev Team</owners>
      <description>shared library used for multiple titan projects</description>  
    <file src="bin\**\*.dll" target ="lib" />
    <file src="bin\**\*.pdb" target="lib" />

Hi Chase,

You can do this by setting the version to $version$ in the file and passing the correct version at the command line to msbuild. See the OctoPack documentation for more information.

Please also see my response to your stackoverflow post.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.