Class Library Octopack Issue

Hi,

I have a solution with a single class library project in it. I have added octopack, and the project builds on TFS. But when it tries to run octopack, I get this error:

Could not find a part of the path 'C:\Builds\1\CAS MVC Library\CASClassLibrary - CI\src\CASClassLibrary\lib\net451'.

There was an error calling NuGet. Please see the output above for more details. Command line: 'C:\Builds\1\CAS MVC Library\CASClassLibrary - CI\src\packages\OctoPack.3.0.41\tools\NuGet.exe' pack "C:\Builds\1\CAS MVC Library\CASClassLibrary - CI\src\CASClassLibrary\obj\octopacking\CASClassLibrary.nuspec"  -NoPackageAnalysis -BasePath "C:\Builds\1\CAS MVC Library\CASClassLibrary - CI\src\CASClassLibrary" -OutputDirectory "C:\Builds\1\CAS MVC Library\CASClassLibrary - CI\src\CASClassLibrary\obj\octopacked" -Version 1.0.2.30102

System.Exception: There was an error calling NuGet. Please see the output above for more details. Command line: 'C:\Builds\1\CAS MVC Library\CASClassLibrary - CI\src\packages\OctoPack.3.0.41\tools\NuGet.exe' pack "C:\Builds\1\CAS MVC Library\CASClassLibrary - CI\src\CASClassLibrary\obj\octopacking\CASClassLibrary.nuspec"  -NoPackageAnalysis -BasePath "C:\Builds\1\CAS MVC Library\CASClassLibrary - CI\src\CASClassLibrary" -OutputDirectory "C:\Builds\1\CAS MVC Library\CASClassLibrary - CI\src\CASClassLibrary\obj\octopacked" -Version 1.0.2.30102
   at OctoPack.Tasks.CreateOctoPackPackage.RunNuGet(String specFilePath, String octopacking, String octopacked, String projectDirectory) in y:\work\46cfb6001f03d701\source\OctoPack.Tasks\CreateOctoPackPackage.cs:line 551
   at OctoPack.Tasks.CreateOctoPackPackage.Execute() in y:\work\46cfb6001f03d701\source\OctoPack.Tasks\CreateOctoPackPackage.cs:line 196

I have attached the nuspec file. I also added the /p:OctoPackSuppressAddingFiles=true option to the msbuild arguments.

Thanks!
Stephen

CASClassLibrary.nuspec (1 KB)

Hi Stephen,

Thanks for getting in touch! Could you show us the complete MSbuild arguments you are passing down on your build definition?

Thanks!

Dalmiro

Sure, here they are:

/p:RunOctoPack=true /p:OctoPackSuppressAddingFiles=true /p:OctoPackPublishPackageToHttp=https://nuget.ourserver.gatech.edu/nuget /p:OctoPackPublishApiKey=blahblahblah

Thanks for your help!

  • Stephen

Hi, sorry this was my fault. I had specified \lib\net451 as the file locations because this was the nuspec file I used to use when manually creating the nuget packages for this library.

I updated it to bin\Release and it works as expected (after also removing /nuget from my repository URL).

Thanks!
Stephen