Setup of a new Computer and Builds with Postsharp failed

roger.schlumpf's Avatar

roger.schlumpf

14 Mar, 2018 10:00 AM

Hi

i started Monday with the setup of a new Notebook and after i install all my tools, i checked out the .net Solutions and want start to work. But all projects with PostSharp failed on buildprocess.
We have PostSharp Version 5.0.35 as nuget Package installed, on my PC i have installed 5.0.48. I Tryied different Installations and settings but all failed with the same warning:
5> Connecting to PostSharp pipe server 'postsharp-S-1-5-21-2025429265-448539723-1177238915-16107-4.0-x64-release-5.0.35'
5> The pipe server 'postsharp-S-1-5-21-2025429265-448539723-1177238915-16107-4.0-x64-release-5.0.35' is not started, trying to synchronize with other clients.
5> Starting pipe server 'postsharp-S-1-5-21-2025429265-448539723-1177238915-16107-4.0-x64-release-5.0.35'.
5> Starting the pipe server: C:\ProgramData\PostSharp\5.0.35\bin.Release\postsharp-net40-x64-srv.exe.
5> Starting the pipe server: "C:\ProgramData\PostSharp\5.0.35\bin.Release\postsharp-net40-x64-srv.exe /tp "postsharp-S-1-5-21-2025429265-448539723-1177238915-16107-4.0-x64-release-5.0.35"". The current process ID is 18892.
5>D:\Projects\Argus.Avenue\packages\PostSharp.5.0.35\build\PostSharp.targets(314,5): warning : Pipe server 'postsharp-S-1-5-21-2025429265-448539723-1177238915-16107-4.0-x64-release-5.0.35' did not start in due time.
5>Done executing task "PostSharp30" -- FAILED.
5>Done building target "PostSharp30Core" in project "Argus.Avenue.Aspekte.csproj" -- FAILED.

Interessting: the PID in the log is not the PID i see in TaskManager.
When switching the host in the project definition to manage then the project build successfully.
I dont have any Idea what i still can try to solve the Problem and i allready waste 3!!! days with the PostSharp Installation, so please can you give me any advice for this issue?

An other Issue, when i start a build, there are up to 12 Instances of PostSharp Compiler Services which slows down my machine. Is there an option to restrict the number of instances?

regards
Roger

  1. Support Staff 1 Posted by PostSharp Techn... on 14 Mar, 2018 04:28 PM

    PostSharp Technologies's Avatar

    Hello,

    To investigate the build error we would like to ask you to set the build host to Native and rebuild (I understand that you tried only Managed and the build was successful). Please let us know whether you get any new error messages when building with the Native host.

    Normally there should be only one instance of PostSharp service running per PostSharp version and platform. The multiple instances running must be caused by the original error that makes the service unresponsive.

    -alex

  2. 2 Posted by roger.schlumpf on 15 Mar, 2018 09:28 AM

    roger.schlumpf's Avatar

    Hi Alex

    thanks for your respond.

    Native Builds doens't work, they run and run until i kill the process.
    So i set the log Level to detailed and send you the logprint and some screenshot. Hope they will help you to find the problem.

    Additional Informations: .Net Framework 4.6.1
    Hardware & OS see attachement.

    Roger

  3. Support Staff 3 Posted by PostSharp Techn... on 15 Mar, 2018 11:03 AM

    PostSharp Technologies's Avatar

    Hello Roger,

    Thank you for all the additional information.

    Do you have any software on your machine that intercepts the access to the file system? It can be an antivirus or a continuous back-up software for example. We would like to ask you to disable these services if you have any and try to rebuild the project.

    -alex

  4. 4 Posted by roger.schlumpf on 15 Mar, 2018 11:32 AM

    roger.schlumpf's Avatar

    Hi Alex

    i stopped the virus scan and give my own user account additionally to the AD Group full access to the rootfolder, on which ms try to build -
    unfortunally without any gain.

    roger

  5. Support Staff 5 Posted by PostSharp Techn... on 15 Mar, 2018 03:00 PM

    PostSharp Technologies's Avatar

    Hello,

    Thanks for the quick update.

    I've noticed in the build log that the solution-wide build option is enabled for this solution. This is an experimental feature, so it's worth checking if it's not causing the issue. Please try to disable the solution-wide build in the solution properties and rebuild the solution. The option can be accessed by right-clicking on the solution in the solution explorer, selecting properties and then PostSharp page. It's stored in the .pssln file under SolutionWideProcessingEnabled name.

    Additionally please try to build the solution both from within the Visual Studio and on the command line to see if there is any difference in the build result.

    If nothing helps then I expect that we'll have to investigate the memory dump of the stuck PostSharp compiler process.

    -alex

  6. 6 Posted by roger.schlumpf on 15 Mar, 2018 05:11 PM

    roger.schlumpf's Avatar

    Hi

    the option for solution wide build is disabled, i just tryed it out to see if it has any effect on my problem.

    As i run msbuild from command line i see that there is problem to interpret String Interpolations:

      AttributeHelper.cs(1072,29): error CS1056: Unerwartetes Zeichen '$'. [d:\Projects\Argus.Avenue\Argus.Avenue.Aspekte\A
    rgus.Avenue.Aspekte.csproj]
      ControllerMethodenLogAttribute.cs(342,64): error CS1056: Unerwartetes Zeichen '$'. [d:\Projects\Argus.Avenue\Argus.Av
    enue.Aspekte\Argus.Avenue.Aspekte.csproj]
      ControllerMethodenLogAttribute.cs(345,114): error CS1056: Unerwartetes Zeichen '$'. [d:\Projects\Argus.Avenue\Argus.A
    venue.Aspekte\Argus.Avenue.Aspekte.csproj]
      ControllerMethodenLogAttribute.cs(348,64): error CS1056: Unerwartetes Zeichen '$'. [d:\Projects\Argus.Avenue\Argus.Av
    enue.Aspekte\Argus.Avenue.Aspekte.csproj]
      ControllerMethodenLogAttribute.cs(362,118): error CS1056: Unerwartetes Zeichen '$'. [d:\Projects\Argus.Avenue\Argus.A
    venue.Aspekte\Argus.Avenue.Aspekte.csproj]
      ControllerMethodenLogAttribute.cs(363,118): error CS1056: Unerwartetes Zeichen '$'. [d:\Projects\Argus.Avenue\Argus.A
    venue.Aspekte\Argus.Avenue.Aspekte.csproj]
      ControllerMethodenLogAttribute.cs(364,139): error CS1056: Unerwartetes Zeichen '$'. [d:\Projects\Argus.Avenue\Argus.A
    venue.Aspekte\Argus.Avenue.Aspekte.csproj]
      ControllerMethodenLogAttribute.cs(365,139): error CS1056: Unerwartetes Zeichen '$'. [d:\Projects\Argus.Avenue\Argus.A
    venue.Aspekte\Argus.Avenue.Aspekte.csproj]
      ControllerMethodenLogAttribute.cs(366,118): error CS1056: Unerwartetes Zeichen '$'. [d:\Projects\Argus.Avenue\Argus.A
    venue.Aspekte\Argus.Avenue.Aspekte.csproj]
      ControllerMethodenLogAttribute.cs(373,118): error CS1056: Unerwartetes Zeichen '$'. [d:\Projects\Argus.Avenue\Argus.A
    venue.Aspekte\Argus.Avenue.Aspekte.csproj]
      ControllerMethodenLogInfo.cs(127,20): error CS1056: Unerwartetes Zeichen '$'. [d:\Projects\Argus.Avenue\Argus.Avenue.
    Aspekte\Argus.Avenue.Aspekte.csproj]

    But only in projects who use postharp :-(
    A reinstall of .Net Framework 4.7.1 Dev Package doesnt helps.

    Roger

  7. Support Staff 7 Posted by PostSharp Techn... on 15 Mar, 2018 06:12 PM

    PostSharp Technologies's Avatar

    Hello,

    Regarding the unexpected character error CS1056 - this is coming from the C# compiler and it looks like the older version of the compiler is used when building on command line. Please make sure that you open the VS command line window for VS 2017.

    There are also warnings in the log regarding the tools version: Project file contains ToolsVersion="12.0". This toolset may be unknown or missing...
    Usually this should not be an issue, but may indicate that some of the projects were not fully upgraded to the new VS/.NET version.

    So far, we couldn't pinpoint where the original issue might be coming from. Could you please try to create a memory dump file of the stuck PostSharp compiler process? You can do it in the Windows Task Manager by right-clicking on the process and selecting "Create a dump file". Please attach a zipped dump file to this discussion.

    -alex

  8. 8 Posted by roger.schlumpf on 16 Mar, 2018 08:28 AM

    roger.schlumpf's Avatar

    Morning Alex

    here are the datas. I tried Installation with Microsoft.Net.Compilers 2.3.1 & 2.6.1 but didn't work. Next i will check the msbuild versions.

    roger

  9. 9 Posted by roger.schlumpf on 16 Mar, 2018 08:51 AM

    roger.schlumpf's Avatar

    so, i install now msbuild 12 because our apsect project expecting Toolversion 12, but it still not works. When i switch the toolVersion Property in the project file to 14, then the build success without any error. Why that?? And what are the sideeffects of a change like this?

  10. Support Staff 10 Posted by PostSharp Techn... on 16 Mar, 2018 11:39 AM

    PostSharp Technologies's Avatar

    Hello,

    We have investigated the dump file of the PostSharp process and we see that Trend Micro antivirus has injected into the process (tmmon64.dll). It appears to be the cause of the original issue and Trend Micro is known for causing the exact same issues before.

    You've mentioned that you've stopped the virus scan, however in this case you need to disable the active process monitoring. I believe it's called behavior monitoring in Trend Micro (http://docs.trendmicro.com/all/smb/wfbs-s/v8.0/en-us/wfbs_8.0_olhsr...). Please disable this feature and try to rebuild your solution.

    Regarding the ToolsVersion. It affects what versions of C# and VB compilers are used. With ToolsVersion 12.0 you're using an older version of C# compiler that doesn't support string interpolation and other features. This will cause the compilation to fail on your project that uses these features. It's best to agree on a single version of tools to use within the team and set that version in the project file to avoid issues.

    -alex

  11. 11 Posted by roger.schlumpf on 16 Mar, 2018 12:22 PM

    roger.schlumpf's Avatar

    Hi Alex

    That was the missing hint. After uninstalling trend micro everything works fine and all builds run succesfully without any dependency of tool version or something!!
    I had never assume, that something like trend micro, after i deactivte it(!!), would inject into the build process and break it.

    Thanks for your Patience and your support. Great Job. Maybe your Enginner can enhance the logprints for this issue, so that it will be evident when trendmicro breaks the build.

    Anyway, this case can bo closed

    Nice weekend
    Roger

  12. PostSharp Technologies closed this discussion on 16 Mar, 2018 02:45 PM.

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

Keyboard shortcuts

Generic

? 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