I’m running v2.0.1.763 and I have an issue when I’m trying to create a release. This is a brand new installation and I have not had it working all the way through yet. So, I’m not sure if it’s an issue with the way I’m pushing the NuGet packages from TFS build or if it’s an issue with the Octopus beta 2.0. Here is a summary of the issue:
I queue a new build in TFS and push the package (using octopack) to my own on prem instance of NuGet.Server. All seems right with the world. I can view the new release from the NuGet.Server web page and when I search the NuGet feed within Octopus, it returns all the right versions.
I then go to edit the release I’m working with and when I search for the version, it find it no problem. Then the issue arises - I save the release (click the green ‘save’ button on the Edit Release screen) and I get an error message on the release overview screen - "The resource ‘MTMH.WebService version 2013.12.02.1’ was not found. Here is the stack trace from the log:
Hi David - I had a shot at replicating this with NuGet.Server v2.7.41101.299 - no luck unfortunately. Are you able to please let us know the version of NuGet.Server that you’re using? Thanks in advance.
It details a number of things that can go wrong when hosting NuGet.Server in IIS - the second answer is the first place to start - making sure that the .nupkg extension is mapped to the application/zip MIME type.
If you have a chance to check over the suggestions in both of those answers please let me know if you continue to have trouble. Positive we’ll get to the bottom of this one eventually! Thanks again.
The TFS step “Push Package(s) to Octopus” does not resolve a variable inside another variable unlike the “Package Application” step which does resolve correctly.
The TFS variable definition is: ArtifactLocation = \chitstapp02\ProdApps\Jay\Databases$(Build.DefinitionName)
The TFS build variable used here is $(ArtifactLocation)\Package$(Build.DefinitionName).$(Build.BuildNumber).nupkg
The log error is
Starting task: Package $(Build.DefinitionName)
“C:\Users********\Downloads\agent\tasks\OctopusPack\1.2.81\Octo.exe” pack --id=“GTS-Databases-Integration” --format=NuPkg --version=2016.10.17.002-Integration --outFolder="\chitstapp02\ProdApps\Jay\Databases\GTS-Databases-Integration\Package" --basePath="\chitstapp02\ProdApps\Jay\Databases\GTS-Databases-Integration\Latest" --author=“Guggenheim Partners” --title=“GTS-Databases-Integration” --description=“GTS-Databases-Integration DACPAC” --releaseNotes=“Built: $(Date:yyyy-MM-dd@HH:mm)” --releaseNotesFile=“C:\TFS Build Agent_work\2\s” --overwrite=True --include=“CommApps.publish.xml” --include=“CommApps.dacpac” --include=“LH.publish.xml” --include="LH.dacpac"
Octopus Deploy Command Line Tool, version 3.4.2+Branch.master.Sha.869d64eaf5d2657a5daadda886a2dd697e2a024c
The release notes file ‘“C:\TFS Build Agent_work\2\s”’ could not be found
Packing “GTS-Databases-Integration” version “2016.10.17.002-Integration”…
Saving “GTS-Databases-Integration.2016.10.17.002-Integration.nupkg” to “\chitstapp02\ProdApps\Jay\Databases\GTS-Databases-Integration\Package”…
Done.
Finishing task: OctopusPack
Starting task: Push Packages to Octopus
Cannot find path ‘\chitstapp02\ProdApps\Jay\Databases$(Build.DefinitionName)\GTS-Databases-Integration.2016.10.17.002-Integration.nupkg’ because it does not exist.
Thanks for getting in touch! We don’t do anything special (to my knowledge) that would cause the $(Build.DefinitionName) to not resolve when other variables like $(Build.BuildNumber) do.
One thought I have is whether this task is running as part of a Build or as part of a Release in Release Management, and therefore perhaps the $(Build.DefinitionName) variable isn’t defined?