Octopus / TeamCity build issues

integration

(Craig Smith) #1

Howdy

We’re using TeamCity as a build server and if I don’t have a nuspec file in my project folder I see the following message:

A NuSpec file named ‘Ccnz.Common.DataAnnotationExtensions.nuspec’ was not found in the project root, so the file will be generated automatically. However, you should consider creating your own NuSpec file so that you can customize the description properly.

… which seems to work just fine, but if I do have a nuspec file, I start seeing the following message:

[CreateOctoPackPackage] error OCTONUGET: Id is required.
[14:46:36][CreateOctoPackPackage] error OCTONUGET: Authors is required.
[14:46:36][CreateOctoPackPackage] error OCTONUGET: Description is required.

Why is it that if Octopus generates it’s own nuspec file, everything is cool and groovy, but if I use my own nuspec file with standard replacement tokens, it spits the chewy?

a. Shouldn’t Octopus be smart enough to go looking for them and make the substitutions required?
b. Realise that it should be targeting the csproj file instead. Probably more a TeamCity thing, but I don’t have access to see the way it’s set up.
c. Just substitute whatever it uses when it generates its own file.

Cheers
Craig


(Dalmiro Grañas) #3

Hi Craig,

Thanks for reaching out. Would you mind sending me the below data so I can reproduce this on my end?

  • version of Octopack that you are using.
  • full content of your custom nuspec file.

Thanks,
Dalmiro


(Craig Smith) #4

Hi Dalmiro

Thanks for responding. It’s OctoPack v3.6.1

My nuspec file is as follows. I introduced it so I can build NuGet files as part of my Post Build Events, but I set it up to so it doesn’t run in TeamCity.

<?xml version="1.0"?>
<package >
  <metadata>
    <id>$id$</id>
    <version>$version$</version>
    <title>$title$</title>
    <authors>$author$</authors>
    <owners>$author$</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>$description$</description>
    <copyright>Copyright 2018</copyright>
    <tags></tags>
  </metadata>
  <files>
    <file src="bin\$configuration$\$id$.pdb" target="lib\net45\" />
  </files>
</package>

I would be okay with hard-coding the values here, but that would mean I’d need to update the version every single time.

[assembly: AssemblyVersion("1.2.*")]

Cheers
Craig


(Craig Smith) #5

Hi Dalmiro

I resolved my issues by removing the .nuspec files and including the .pdb files in another way (i.e. by using the nuget -symbols option).

Cheers
Craig


(Dalmiro Grañas) #6

Hi Craig,

Deep apologies for taking so long to reply :frowning: . I’m very glad to hear you found a workaround for this.

Let me know if you run into any other issues. I promise to reply a lot earlier the next time :slight_smile:

Cheers
Dalmiro