Build error during Postsharp processing on Atlassian Bamboo Build server

tommi.lehto's Avatar


21 Jun, 2018 02:31 PM


I'm trying to setup an automated build using Atlassian Bamboo build server for my project. When the build plan with msbuild is executed by bamboo, it fails with "error : The process C:\ProgramData\PostSharp\4.3.24\bin.Release\postsharp-net40-x64-native.exe exited with code -1."

When I build the project using visual studio on my pc or run msbuild in Visual Studio 2017 command-line on build-server, the project compiles without errors!

I have installed .Net Framework 4.7.2 (SDK) and latest "Build Tools for Visual Studio 2017" on bamboo server.

Basically I'm running the following build command: 'msbuild /detailedsummary /verbosity:detailed /p:Configuration=40_dev /t:Build MJF.Collector\MJF.Collector.csproj'.

For comparison, I have attached two build log for analyze/comparison:
- failing automated build on Bamboo Build server: log01_FailingAutomatedBuildDMC-MJFCOLLECTOR01-HPGSIACGETSRC-53.log - successful build on bamboo build server using "Visual Studio 2017 command-line": log02_SuccessfulManuallBuildUsingVisualStudio2017CmdLineOnBambooServer.log

Best Regards,

  1. Support Staff 1 Posted by PostSharp Techn... on 22 Jun, 2018 12:15 PM

    PostSharp Technologies's Avatar

    Hello Tommi,

    we are investigating your issue. We'll come back to you as soon as we know more. Thank you for the logs!

    Best regards,

  2. Support Staff 2 Posted by PostSharp Techn... on 26 Jun, 2018 01:54 PM

    PostSharp Technologies's Avatar


    According to the build log, ICLRRuntimeInfo::SetDefaultStartupFlags returned error code 80070002, which corresponds to the File Not Found error. One of the parameters for the failed method is the path to the host configuration file (app.config). In the log the config path shows up as "C:\windows\system32\config\systemprofile\AppData\Local\Temp\PostSharp\107f79f061fe64cb.config".

    It looks like there's an issue with accessing that path during the build. You can try to change the user account under which the build server is running. Another option is to change the %TEMP% environment variable in the build settings and point it to a path that's accessible by all users.


  3. Support Staff 3 Posted by PostSharp Techn... on 04 Jul, 2018 02:57 PM

    PostSharp Technologies's Avatar


    We are going to close this request as there have not been any further updates. Please feel free to reopen the discussion if you need more help.

    PostSharp Team

  4. PostSharp Technologies closed this discussion on 04 Jul, 2018 02:57 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac