OCTONUGET: Could not load file or assembly 'Microsoft.Build.Framework

Hi,

I am working with one of our projects to get into CI. We are using TeamCity as our build server. All of our other projects seems working correctly using OctoPack.3.0.60 but when I used OctoPack.3.4.3 I got these build errors:

OctoPack] CreateOctoPackPackage
[20:43:38][CreateOctoPackPackage] error OCTONUGET: Could not load file or assembly ‘Microsoft.Build.Framework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.
[20:43:38][CreateOctoPackPackage] error OCT-1805672349: There was an error calling NuGet. Please see the output above for more details. Command line: [20:43:38]
[CreateOctoPackPackage] error OCT-1805672349: System.Exception: There was an error calling NuGet. Please see the output above for more details. Command line: "“nuspec” -NoPackageAnalysis -BasePath “” -OutputDirectory “” -Version 1.0.0.190
at OctoPack.Tasks.CreateOctoPackPackage.RunNuGet(String specFilePath, String octopacking, String octopacked, String projectDirectory)
at OctoPack.Tasks.CreateOctoPackPackage.Execute()

Any idea what this is?

Sincerely,
Edgar

Hi Edgar,

Thanks for getting in touch! I’m really sorry you’ve run into this - we’ve just updated OctoPack to use a custom build of NuGet.exe 3.5.0 and there must be a problem. NuGet.exe is ILMerged and should contain all of the dependencies it needs, but it looks like there is a problem with this one.

I’ll look into this tomorrow as a priority and ship a patch as soon as possible.

In the meantime I would recommend using an earlier version of OctoPack, prior to 3.4.3.

Thanks for letting us know about this and I hope that helps!
Mike

Hi Mike,

Good day! Thank you for that information. Will use OctoPack.3.0.60 for now then.

Thanks
Edgar

Hi Edgar,

You can follow this GitHub issue for a resolution: https://github.com/OctopusDeploy/Issues/issues/2949

Hope that helps!
Mike

Hello Edgar

I am using v3.4.4 of Octopack however I am still getting the same error message as above on Team city. Any ideas why if you have released a fix.

Regards

Ayaz

Apologies the last message was for Mike.

I am using v3.4.4 of Octopack however I am still getting the same error message as above on Team city. Any ideas why if you have released a fix.

Regards

Ayaz

Hi All,

Thanks for keeping us in the loop! It turns out I made a mistake with our build process and there were two copies of NuGet.exe floating around - and in this case the wrong one got packaged and our tests didn’t detect my mistake. I’m really sorry about this, but it shouldn’t happen again.

I’ve fixed that, pushed OctoPack 3.4.6 to NuGet.org, and hidden the bad versions so nobody else runs into this issue.

Upgrade and let me know how you go. :slight_smile:

Hope that helps!
Mike