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
- Create a new Empty Project (.NET Framework) with simple Hello World main class
- Add OctoPack 3.6.4 to packages.config
- Add reference to OctoPack.Tasks in csproj
<Reference Include="OctoPack.Tasks"> <HintPath>..\packages\OctoPack.3.6.4\build\OctoPack.Tasks.dll</HintPath> </Reference>
- 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')" />
- 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)