Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    'Build .NET MSBuild Project' action fails after upgrading to BuildMaster 4+

    Scheduled Pinned Locked Moved Support
    9 Posts 1 Posters 80 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      The log output for the failed action:

      Action Group 23: Build MyApp webapp
      Action 1: Build MyApp.Web.Mvc.csproj Target:Package Properties:(none)
      Custom Variables: (none)
      Source and Target directory same; splitting.
      AgentBasedAction Initialization Complete:
        Temp Directory: C:\BuildMaster\_SVCTMP\_A3\_S4\TMP
        Source Directory: C:\BuildMaster\_SVCTMP\_A3\_S4\SRC
        Target Directory: C:\BuildMaster\_SVCTMP\_A3\_S4\WRK
        Server: SNYDEVEL (Id: 1)
      Initializing action...
      Initialization complete. Executing...
      Arguments: "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe" "C:\BuildMaster\_SVCTMP\_A3\_S4\SRC\Solutions\MyApp.Web.Mvc\MyApp.Web.Mvc.csproj" "/t:Package" "/p:outDir=C:\BuildMaster\_SVCTMP\_A3\_S4\WRK\"
      Working Directory: C:\BuildMaster\_SVCTMP\_A3\_S4\SRC
      Executing C:\BuildMaster\_SVCTMP\ExtTemp\WindowsSdk\BmBuildLogger.exe
      Building Project "MyApp.Web.Mvc.csproj" (Package target(s)):
      C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(276,5): error MSB4184: The expression "[System.IO.Path]::Combine(C:\BuildMaster\_SVCTMP\_A3\_S4\SRC\Solutions\MyApp.Web.Mvc, C:\BuildMaster\_SVCTMP\_A3\_S4\WRK"\)" cannot be evaluated. Illegal characters in path.
      Done building project "MyApp.Web.Mvc.csproj" -- FAILED.
      MSBuild action failed; msbuild.exe returned code 1
      Execution complete. Finalizing...
      Target directory unused; joining with source.
      Finalization complete.
      
      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        <strike>If I had to guess, this is specific to the 64-bit MSBuild. Can you change the configuration of the Windows SDK extension to use C:\WINDOWS\Microsoft.NET\Framework\ instead of C:\WINDOWS\Microsoft.NET\Framework64\ for the SDK Path?</strike>

        See my next post for the correct name and values.

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          Per the suggestion in Tod's answer, I modified the WindowsSdkPath setting to the suggested value, but I didn't set the FrameworkRuntimePath setting for the extension (thinking it would use a default value):

          Action Group 23: Build MyApp webapp
          Action 1: Build Apps.Web.Mvc.csproj Target:Package Properties:(none)
          Custom Variables: (none)
          Source and Target directory same; splitting.
          AgentBasedAction Initialization Complete:
            Temp Directory: C:\BuildMaster\_SVCTMP\_A3\_S4\TMP
            Source Directory: C:\BuildMaster\_SVCTMP\_A3\_S4\SRC
            Target Directory: C:\BuildMaster\_SVCTMP\_A3\_S4\WRK
            Server: SNYDEVEL (Id: 1)
          Initializing action...
          Initialization complete. Executing...
          An unhandled exception occurred while executing this action: System.InvalidOperationException: .NET framework runtime path is not valid. Verify .NET extension configuration.
             at Inedo.BuildMaster.Extensibility.Actions.RemoteCommandExecution.RemoteCommandExecuter.ExecuteCommand(RemoteActionBase remoteAction, String commandName, String[] commandArgs)
             at Inedo.BuildMaster.Extensibility.Agents.Local.LocalAgent.Inedo.BuildMaster.Extensibility.Agents.IRemoteCommandExecuter.ExecuteCommand(RemoteActionBase action, String commandName, String[] commandArgs)
             at Inedo.BuildMaster.Extensibility.Actions.RemoteActionBase.ExecuteRemoteCommand(String name, String[] args)
             at Inedo.BuildMasterExtensions.WindowsSdk.MSBuild.ExecuteMSBuildScriptAction.Execute()
             at Inedo.BuildMaster.Extensibility.Actions.ActionBase.ExecuteInternal(IActionExecutionContext context, ExtensionConfigurerBase extensionConfigurer, Boolean resumeNextOnError, Boolean logErrorsAsWarnings)
          

          But even after I set FrameworkRuntimePath to 'C:\WINDOWS\Microsoft.NET\Framework' also, MSBuild still failed and this time with no helpful details:

          Action Group 23: Build MriApps webapp
          Action 1: Build Apps.Web.Mvc.csproj Target:Package Properties:(none)
          Custom Variables: (none)
          Source and Target directory same; splitting.
          AgentBasedAction Initialization Complete:
            Temp Directory: C:\BuildMaster\_SVCTMP\_A3\_S4\TMP
            Source Directory: C:\BuildMaster\_SVCTMP\_A3\_S4\SRC
            Target Directory: C:\BuildMaster\_SVCTMP\_A3\_S4\WRK
            Server: SNYDEVEL (Id: 1)
          Initializing action...
          Initialization complete. Executing...
          Arguments: "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" "C:\BuildMaster\_SVCTMP\_A3\_S4\SRC\Solutions\Mri.Web.Mvc\Apps.Web.Mvc.csproj" "/t:Package" "/p:outDir=C:\BuildMaster\_SVCTMP\_A3\_S4\WRK\"
          Working Directory: C:\BuildMaster\_SVCTMP\_A3\_S4\SRC
          Executing C:\BuildMaster\_SVCTMP\ExtTemp\WindowsSdk\BmBuildLogger.exe
          MSBuild action failed; msbuild.exe returned code -1
          Execution complete. Finalizing...
          Target directory unused; joining with source.
          Finalization complete
          
          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            Sorry about that - I listed the wrong names for the configuration values... they should be:

            WindowsSDKPath: C:\Program Files\Microsoft SDKs\Windows\v6.1\

            FrameworkRuntimePath: C:\WINDOWS\Microsoft.NET\Framework\

            Note that this is of course for v6.1 of the Windows SDK, if you have a later version make sure it exists on disk.

            1 Reply Last reply Reply Quote 0
            • ? This user is from outside of this forum
              Guest
              last edited by

              I changed the SDK path setting to 'C:\Program Files\Microsoft SDKs\Windows\v7.1', but it didn't seem to help:

              Action Group 23: Build MyApp webapp
              Action 1: Build MyApp.Web.Mvc.csproj Target:Package Properties:(none)
              Custom Variables: (none)
              Source and Target directory same; splitting.
              AgentBasedAction Initialization Complete:
                Temp Directory: C:\BuildMaster\_SVCTMP\_A3\_S4\TMP
                Source Directory: C:\BuildMaster\_SVCTMP\_A3\_S4\SRC
                Target Directory: C:\BuildMaster\_SVCTMP\_A3\_S4\WRK
                Server: SNYDEVEL (Id: 1)
              Initializing action...
              Initialization complete. Executing...
              Arguments: "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" "C:\BuildMaster\_SVCTMP\_A3\_S4\SRC\Solutions\MyApp.Web.Mvc\MyApp.Web.Mvc.csproj" "/t:Package" "/p:outDir=C:\BuildMaster\_SVCTMP\_A3\_S4\WRK\"
              Working Directory: C:\BuildMaster\_SVCTMP\_A3\_S4\SRC
              Executing C:\BuildMaster\_SVCTMP\ExtTemp\WindowsSdk\BmBuildLogger.exe
              Microsoft (R) Build Engine version 4.0.30319.17929
              [Microsoft .NET Framework, version 4.0.30319.18052]
              Copyright (C) Microsoft Corporation. All rights reserved.
              MSBuild action failed; msbuild.exe returned code -1
              Execution complete. Finalizing...
              Target directory unused; joining with source.
              Finalization complete.
              
              1 Reply Last reply Reply Quote 0
              • ? This user is from outside of this forum
                Guest
                last edited by

                I was able to get the build to work by running MSBuild via an 'execute command line' action, but I had to change the paths that include C:\BuildMaster\_SVCTMP\_A3\_S4\SRC to C:\BuildMaster\_SVCTMP\_A3\_S4\WRK.

                1 Reply Last reply Reply Quote 0
                • ? This user is from outside of this forum
                  Guest
                  last edited by

                  It turns out this may have been a problem with the way the build logger executable was handling arguments (related GitHub issue: https://github.com/Inedo/bmx-windowssdk/issues/10 )

                  This was resolved in the WindowsSDK extension v4.7. I notice you are also building an MVC project... there is also a new action "Build ASP.NET Web or MVC Project" in this version that can publish those projects to an output path and will also perform configuration file transforms if that is something you need or are interested in.

                  1 Reply Last reply Reply Quote 0
                  • ? This user is from outside of this forum
                    Guest
                    last edited by

                    The "Execute MSBuild Script" action still doesn't work; I added the following to MsBuild Properties:
                    IsDesktopBuild=false
                    AspNetCompiler=true
                    AspNetMerge=false

                    (Some of) the log output:

                    Initialization complete. Executing...
                    Arguments: "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe"  "C:\BuildMaster\_SVCTMP\_A3\_S4\SRC\Solutions\Mri.Web.Mvc\Apps.Web.Mvc.csproj" "/t:Package" "/p:outDir=C:\BuildMaster\_SVCTMP\_A3\_S4\WRK\;IsDesktopBuild=false;AspNetCompiler=true;AspNetMerge=false"
                    Working Directory: C:\BuildMaster\_SVCTMP\_A3\_S4\SRC
                    Executing C:\BuildMaster\_SVCTMP\ExtTemp\WindowsSdk\BmBuildLogger.exe
                    Starting process: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "C:\BuildMaster\_SVCTMP\_A3\_S4\SRC\Solutions\Mri.Web.Mvc\Apps.Web.Mvc.csproj" "/t:Package" "/p:outDir=C:\BuildMaster\_SVCTMP\_A3\_S4\WRK\;IsDesktopBuild=false;AspNetCompiler=true;AspNetMerge=false" "/logger:C:\BuildMaster\_SVCTMP\ExtTemp\WindowsSdk\BmBuildLogger.exe;853e6159d1bd44a0be22f711b83ce6a9"
                    MSBuild action failed; msbuild.exe returned code -1
                    

                    The new "Build ASP.NET Web or MVC Project" action doesn't work for me (given how I set-it-up):

                    Project File: Solutions\MyApp.Web.Mvc\MyApp.Web.Mvc.csproj

                    Additional Arguments:
                    /t:Package /p:IsDesktopBuild=false;AspNetCompiler=true;AspNetMerge=false

                    [The last three MSBuild properties are something I added to the command line action and they work as expected.]

                    (Some of) the log output for the action:

                    Arguments: "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" "C:\BuildMaster\_SVCTMP\_A3\_S4\WRK\Solutions\MyApp.Web.Mvc\MyApp.Web.Mvc.csproj" /t:Rebuild /p:Configuration=Release;DeployOnBuild=True;BaseIntermediateOutputPath=C:\BuildMaster\_SVCTMP\_A3\_S4\TMP\ /t:Package /p:IsDesktopBuild=false;AspNetCompiler=true;AspNetMerge=false
                    Working Directory: C:\BuildMaster\_SVCTMP\_A3\_S4\WRK\Solutions\MyApp.Web.Mvc
                    Executing C:\BuildMaster\_SVCTMP\ExtTemp\WindowsSdk\BmBuildLogger.exe
                    Starting process: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "C:\BuildMaster\_SVCTMP\_A3\_S4\WRK\Solutions\MyApp.Web.Mvc\MyApp.Web.Mvc.csproj" "/t:Rebuild" "/p:Configuration=Release;DeployOnBuild=True;BaseIntermediateOutputPath=C:\BuildMaster\_SVCTMP\_A3\_S4\TMP\\" "/t:Package" "/p:IsDesktopBuild=false;AspNetCompiler=true;AspNetMerge=false" "/logger:C:\BuildMaster\_SVCTMP\ExtTemp\WindowsSdk\BmBuildLogger.exe;b7a1f79cc6f845a3b2a9ff63f7fb9a43"
                    An unhandled exception occurred while executing this action: System.InvalidOperationException: There are no files in the expected output directory: C:\BuildMaster\_SVCTMP\_A3\_S4\TMP\Release\Package\PackageTmp
                       at Inedo.BuildMaster.Extensibility.Actions.RemoteCommandExecution.RemoteCommandExecuter.ExecuteCommand(RemoteActionBase remoteAction, String commandName, String[] commandArgs)
                       at Inedo.BuildMaster.Extensibility.Agents.Local.LocalAgent.Inedo.BuildMaster.Extensibility.Agents.IRemoteCommandExecuter.ExecuteCommand(RemoteActionBase action, String commandName, String[] commandArgs)
                       at Inedo.BuildMaster.Extensibility.Actions.RemoteActionBase.ExecuteRemoteCommand(String name, String[] args)
                       at Inedo.BuildMaster.Extensibility.Actions.ActionBase.ExecuteInternal(IActionExecutionContext context, ExtensionConfigurerBase extensionConfigurer, Boolean resumeNextOnError, Boolean logErrorsAsWarnings)
                    
                    1 Reply Last reply Reply Quote 0
                    • ? This user is from outside of this forum
                      Guest
                      last edited by

                      Interesting - was there an error message or indication as to why the first project failed to build? It does appear that the arguments were passed in correctly.

                      The 2nd error would be expected because the added target changes the way MSBuild outputs the target files. The action is expecting the output to be in the \TMP\Release\Package\PackageTmp directory.

                      1 Reply Last reply Reply Quote 0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      • 1 / 1
                      • First post
                        Last post
                      Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation