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!
BuildMaster 4.01 Beta - "Build MSBuild Project" Broken?
-
I'm not sure if I'm doing something wrong or if the MSBuild functionality in 4.01 Beta is broken... it looks like a variable (_CopyWebApplication) is bubbling up and causing my MDBuild steps to fail.
Here's the log. The error is 'error MSB4057: The target "_CopyWebApplication" does not exist in the project.'
Build 5 for Self-Service Portal Pilot (10/2/2013 3:18:45 PM)
Action Group 3: Deploy Self-Service Portal
Action 2: Build (Debug) MDXL.SelfServicePortal.sln using .NET 4.0.30319 from C:\Labels to C:\inetpub\wwwroot\Self-Service Portal
Custom Variables: none
AgentBasedAction Initialization Complete:
Temp Directory: C:\BuildMaster_SVCTMP_A5_S8\TMP
Source Directory: C:\Labels
Target Directory: C:\inetpub\wwwroot\Self-Service Portal
Server: 99QL4V1 (Id: 1)
Initializing action...
Initialization complete. Executing...
Building Application
Action: Build; Path: C:\Labels\MDXL.SelfServicePortal.sln
Arguments: "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe" "C:\Labels\MDXL.SelfServicePortal.sln" "/p:Configuration=Debug"
Working Directory: C:\Labels
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.
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Building Project "MDXL.SelfServicePortal.sln" (default targets):
Message: Building solution configuration "Debug|Any CPU".
Building Project "MDXL.SelfServicePortal.csproj" (default targets):
MSBuild: Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
MSBuild: Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
Message: MDXL.SelfServicePortal -> C:\Labels\MDXL.SelfServicePortal\bin\MDXL.SelfServicePortal.dll
Done building project "MDXL.SelfServicePortal.csproj".
Done building project "MDXL.SelfServicePortal.sln".
Copying Web Files
Action: CopyWeb; Path: C:\Labels\MDXL.SelfServicePortal.sln
Arguments: "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe" "C:\Labels\MDXL.SelfServicePortal.sln" /target:_CopyWebApplication "/p:OutDir=C:\inetpub\wwwroot\Self-Service Portal\" "/p:WebProjectOutputDir=C:\inetpub\wwwroot\Self-Service Portal\" "/p:Configuration=Debug"
Working Directory: C:\Labels
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.
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Building Project "MDXL.SelfServicePortal.sln" (_CopyWebApplication target(s)):
Message: Building solution configuration "Debug|Any CPU".
C:\Labels\MDXL.SelfServicePortal.sln.metaproj(0,0): error MSB4057: The target "_CopyWebApplication" does not exist in the project.
Done building project "MDXL.SelfServicePortal.sln" -- FAILED.
Step failed (msbuild returned code 1)
Execution complete. Finalizing...
Finalization complete.
-
Do you have "This is a web application" checked? If so, it must be unchecked to build a solution file.
If you are building the project within the solution and the project actually is an asp.net web app, then you can check the box.
-
It's a MVC 4 web application written using VS 2012. There's just one .sln file and one .csproj file. I'm trying to use the MSBuild task to build and deploy the web app to IIS (like the Visual Studio "Publish" functionality does). I'm not sure if I'm selecting the wrong check boxes, or barking up the wrong tree with this step.
When I check the "this is a web app" box, and point to the .sln file, it fails with the "_CopyWebApplication" error. If I check the box but point it to the .csproj file, it does build and publish, but without all the libs (like, it's missing System.Web.Mvc). If I uncheck that box and point to the .sln file, it just builds and dumps all the .DLLs right into the web site folder, without any of the actual pages (views) and such.
-
Ok, so I got it working, but I'm not sure if this is a workaround or if it's how you're "supposed" to do it. I do the build in two steps:
1.) First, I build the .sln, which copies the DLLs to C:\inetpub\wwwroot\mysite\bin.
2.) Then I build the .csproj, which copies the deployables to C:\inetpub\wwwroot\mysite\ (and leaves the bin\ folder alone).
Like I said, it seems to work well. Is this the right approach or is there a better way to do it? I know people use BuildMaster for MVC apps, so it seems like it should be possible to do it in one step out of the box, and not how I'm doing it.
-
I'm getting this problem as well. it's not copying the libs to the bin folder. Any update on this?
-
The problem with building the project with the _CopyWebApplication is that this legacy target did not copy over bin folder references if they weren't immediately referenced in the web project.
The easiest way to get this to work correctly is to build the web application .csproj without checking "This is a web application project", then grab the output from the _PublishedWebsites\Project.Name\ directory - this will include any referenced libraries and be xcopied to the website's home path. We will likely change the behavior of "this is a web application project" to grab from here instead of whatever contortions it is currently doing from back in the ASP.NET 2.0 days.