Using Enable NuGet Package Restore and Octopack

Hi,

I’ve followed the Teamcity guide and installed Octopak into my console application.

I’d like to use the Enable NuGet Package Restore option so I don’t have check in my packages folder in SVN - to enforce this I also add the packages directory to the SVN ignore list to stop other members of my team from checking it in - but - Teamcity complains that the Octopack targets file can’t be found now packages\OctoPack.2.0.20\targets\OctoPack.targets was not found.

I’m in early versions installing Octopack used create a “.octopack” folder outside of the packages folder which would help here - but I’m left a little confused, by default using Octopack with Teamcity you have check in all package DLLs?

Cheers

I’ve done the same thing before. Did you add Octopack before or after enabling nuget restore? If you did it before enabling nuget restore that will cause the problem you are seeing. Try removing the package and adding it again, but after you have enabled nuget restore. OctoPack install does things a bit differently if you have nuget restore enabled for just this reason.

God bless you Dave!

David’s solution worked for me as well.

In order to remove the Octopack nuget package, I had to:

  1. remove the import from my .csproj file:
  2. delete the OctoPack package from the project’s packages.config:
  3. re-add the OctoPack nuget package through the VS nuget UI
  4. For some reason, OctoPack was adding the new Import directive to the wrong .csproj file; I had to move it to the right one
  5. Check in the /.octopack folder