Octopack is not packing when using custom nuspec file

753 views Asked by At

I am attempting to configure an octopus deployment build in TFS. It was working okay initially, as in it would build, package up using octopack and deploy.

However i want to configure what files get packed and realised that I need to use a custom nuspec file.

I created a new file and used a default .nuspec file with no changes as a starting point.

<?xml version="1.0"?>
<package >
  <metadata>
    <id>Package</id>
    <version>1.0.0</version>
    <authors>me</authors>
    <owners>me</owners>
    <licenseUrl>http://LICENSE_URL_HERE_OR_DELETE_THIS_LINE</licenseUrl>
    <projectUrl>http://PROJECT_URL_HERE_OR_DELETE_THIS_LINE</projectUrl>
    <iconUrl>http://ICON_URL_HERE_OR_DELETE_THIS_LINE</iconUrl>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Package description</description>
    <releaseNotes>Summary of changes made in this release of the package.</releaseNotes>
    <copyright>Copyright 2015</copyright>
    <tags>Tag1 Tag2</tags>
    <dependencies>
      <dependency id="SampleDependency" version="1.0" />
    </dependencies>
  </metadata>
</package>

With this file present and checked in when I do a build it is not creating a nuget package.

As soon as I exclude the nuspec file it all works again.

The nuspec file is My.Project.Name.nuspec

1

There are 1 answers

2
4imble On

Okay i have got it working again.

The package was getting made it seems that octopus was not picking it up. It seems that the <id>Package</id> is also very important and should be named the same as the project and nuspec file.