Call a custom script from a nuget package with a different version to the main deployment


Is it possible to call a custom script from a nuget package that is a different version to the main nuget package being deployed.

deploy: website.2.0.0.nupkg
run a script from: tasks.1.0.0.nupkg

As far as I can see the 2nd package has to have the same version number as the main deployment package to be found

Hi Daniel,

Thanks for reaching out. You can add a Script step that uses tasks.1.0.0.nupkg as the script source using this feature:

There’s no need for the packages version to match.

Let me know if that works for you.


HI Dalmiro,

yes this is the feature I’m trying to use. When the tasks package version is different to the website package then it just throws an error on Acquire packages

The step failed: Activity failed with error ‘The package tasks could not be located in the built-in repository.’.

In the project settings I have ‘Use the Version number from an included package’ set to the website package. Maybe this is interfering with fetching the step package.

Ok I found the issue. Teamcity had the following flag set on the ‘Create Release’ step


I guess this tries to force all packages to have this version number

Hi Daniel,

Yes that parameter will set the value for all packages. If you want to specify different versions for different packages you can use --package=stepName:PackageVersion as shown in the below doc about Octo.exe which is the same thing that the TeamCity plugin uses in the background:

Best regards,