OctoPack with Visual Studio 2015

TeamCity (using MSBuild) is telling me:
You are trying to build with OctoPack, but the NuGet targets file that OctoPack depends on is not available on this computer. This is probably because the OctoPack package has not been committed to source control, or NuGet Package Restore is not enabled. Please enable NuGet Package Restore to download them.

This is the message that I first got when I set up my projects in VS 2013. To solve that, I enabled NuGet Package Restore. However, in 2015, it works differently (see http://stackoverflow.com/questions/27895504/how-do-i-enable-nuget-package-restore-in-visual-studio-2015). What’s the right solution to allow OctoPack to get built?

Thanks,

Hi!

Thanks for getting in touch. Which version of OctoPack are you using, and have you added that package to each of the projects you want packaged?

TeamCity has introduced a build step especially to restore packages prior to running the build: https://blog.jetbrains.com/teamcity/2013/08/nuget-package-restore-with-teamcity/

We use this internally at Octopus and the process looks like this:

  1. “Restore NuGet packages” (NuGet Installer)
  2. “Build Solution” (MsBuild)

Hope that helps!
Mike