MSBuild OctoPack causes OctoPack error OCT-151917342

Hi, I’m currently in the process of migrating the CI/CD process of one of our .NET Framework Web Application solutions from TeamCity (which runs on windows) to Jenkins (which runs on RHEL).
We’ve gotten as far as being able to build the solution successfully using Mono. The problem we’ve encountered is when running OctoPack as it crashes with the following error:

MSBUILD : OctoPack error OCT-151917342: GetDiskFreeSpaceEx assembly: type: member:(null) [/home/jenkins/workspace/myproject/test/Project.Web/Project.Web.csproj]
MSBUILD : OctoPack error OCT-151917342: System.EntryPointNotFoundException: GetDiskFreeSpaceEx assembly: type: member:(null)

I’ve created a post on Mono’s Github about this as well since this sort of falls in between Mono and OctoPack. https://github.com/mono/mono/issues/19861

Steps to Reproduce

  1. Create a new Empty Project (.NET Framework) with simple Hello World main class
  2. Add OctoPack 3.6.4 to packages.config
  3. Add reference to OctoPack.Tasks in csproj
    <Reference Include="OctoPack.Tasks"> <HintPath>..\packages\OctoPack.3.6.4\build\OctoPack.Tasks.dll</HintPath> </Reference>
  4. Import OctoPack.targets in csproj
    <Import Project="..\packages\OctoPack.3.6.4\build\OctoPack.targets" Condition="Exists('..\packages\OctoPack.3.6.4\build\OctoPack.targets')" />
  5. Run mono nuget restore SOLUTION and
    msbuild SOLUTION /t:Rebuild /p:Configuration=Release /p:RunOctoPack=true /p:OctoPackPackageVersion=VERSION

Zip-file containing the project-files
octopack-test.zip (13.5 KB)

On which platforms did you notice this

[ ] macOS
[X] Linux
[ ] Windows

Version Used:

OctoPack 3.6.4

Mono Versions:
Mono JIT compiler version 6.8.0.123 (tarball Tue May 12 15:15:28 UTC 2020)
Microsoft ® Build Engine version 16.5.0-ci for Mono
Copyright © Microsoft Corporation. All rights reserved.

Stacktrace

“/home/jenkins/workspace/octopack-test_pipeline_develop/Project1.sln” (Rebuild target) (1) ->
16:35:31 “/home/jenkins/workspace/octopack-test_pipeline_develop/Project1/Project1.csproj” (Rebuild target) (2) ->
16:35:31 (OctoPack target) ->
16:35:31 MSBUILD : OctoPack error OCT-151917342: GetDiskFreeSpaceEx assembly: type: member:(null) [/home/jenkins/workspace/octopack-test_pipeline_develop/Project1/Project1.csproj]
16:35:31 MSBUILD : OctoPack error OCT-151917342: System.EntryPointNotFoundException: GetDiskFreeSpaceEx assembly: type: member:(null) [/home/jenkins/workspace/octopack-test_pipeline_develop/Project1/Project1.csproj]
16:35:31 MSBUILD : OctoPack error OCT-151917342: at (wrapper managed-to-native) OctoPack.Tasks.Util.OctopusPhysicalFileSystem.GetDiskFreeSpaceEx(string,ulong&,ulong&,ulong&) [/home/jenkins/workspace/octopack-test_pipeline_develop/Project1/Project1.csproj]
16:35:31 MSBUILD : OctoPack error OCT-151917342: at OctoPack.Tasks.Util.OctopusPhysicalFileSystem.EnsureDiskHasEnoughFreeSpace (System.String directoryPath, System.Int64 requiredSpaceInBytes) [0x00000] in :0 [/home/jenkins/workspace/octopack-test_pipeline_develop/Project1/Project1.csproj]
16:35:31 MSBUILD : OctoPack error OCT-151917342: at OctoPack.Tasks.Util.OctopusPhysicalFileSystem.EnsureDiskHasEnoughFreeSpace (System.String directoryPath) [0x00000] in :0 [/home/jenkins/workspace/octopack-test_pipeline_develop/Project1/Project1.csproj]
16:35:31 MSBUILD : OctoPack error OCT-151917342: at OctoPack.Tasks.CreateOctoPackPackage.CreateEmptyOutputDirectory (System.String name) [0x00041] in :0 [/home/jenkins/workspace/octopack-test_pipeline_develop/Project1/Project1.csproj]
16:35:31 MSBUILD : OctoPack error OCT-151917342: at OctoPack.Tasks.CreateOctoPackPackage.Execute () [0x00040] in :0 [/home/jenkins/workspace/octopack-test_pipeline_develop/Project1/Project1.csproj]

Build Log:
logs.txt (9.5 KB)

Hi,

Running OctoPack on Linux is not a scenario we test or support.

In general, ASP.NET applications built on Linux are .NET Core, and we recommend this approach.

I do realize this probably isn’t much help to you at this moment. My recommendation would be, if you are building a full-framework ASP.NET application to use a Windows build agent with Jenkins. Is this possible?

Hi, yes, I figured that would be the case. Our current setup does run a Windows worker and it builds/packages as expected there, but for some internal reasons we wanted to have everything on our Linux workers. I guess we’ll look into some alternate nuget packaging solution for now.

Thanks for your response!

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.