msbuild

Creating a list of Folders in an ItemGroup using MSBuild

Hi, I'm trying to build an ItemGroup in an MSBuild script which contains a list of folders directly below a given 'Root' folder. So - in this example... + Root folder ---- Sub Folder 1 -------- Sub-Sub Folder 1 -------- Sub-Sub Folder 2 ---- Sub Folder 2 ---- Sub Folder 3 ... I would want my ItemGroup to contain "Sub Folder 1", "Sub...

MSBuild: how to control the parsing of a semicolon delimited property

When a single property contains semicolons, MSBuild automatically parse the property into a list of properties when used within an itemgroup. Here's a snippet from my project: <PropertyGroup> <ConnectionString>workstation id=.;packet size=4096;Integrated Security=SSPI;data source=.;initial catalog=$(SqlDbName)</ConnectionString> </...

NAnt or TFS build which is better?

There was a question about Msbuild and NAnt advantages and disadvantages. Now let's see which is better TFS Build(with msbuild) or NAnt. In my opinion NAnt because you can easily move the building environment in few seconds to another machine (depends on copying files), also it's easier to manage, much faster to debug and it's not integr...

TeamCity Environment Variables

How do you access TeamCity environment variables through the post-build event window in visual studio? What type of evaluation can be done to make sure the build is happening on the build server and not locally where the environment variables do not exist? Thanks ...

Is it possible to access files stored in TFS’s source control from the TFSBuild.proj file before the “Get” build task?

I’m using a few custom MSBuild tasks that are checked into source control. I would like to import these tasks into my TFSBuild.proj file that TFS uses to build the project. Right now I have created a 2nd project file that includes all of the uses of these custom tasks. I do this because I can run this project file after the workspace has...

How do I access the metadata of one particular item in an MSBuild ItemGroup?

Given this Itemgroup: <ItemGroup> <Foo Include="First"> <Value>1</Value> </Foo> <Foo Include="Second"> <Value>2</Value> </Foo> </ItemGroup> How can I get the Value metadata for the second item (2)? I'm thinking along the lines of: <Message Text="%(Foo.Value)" Condition="'' == 'Second'" /> But I don't know how to wri...

WPF app builds in vs2k8, but not on command line w/ msbuild

I have a fairly small solution that includes a WPF windows application. It builds perfectly fine when built from the solution. I recently integrated the projects contained within the solution into an existing, much larger command line build that uses MSBuild. When built from the command line, however, I get the following errors: MainWin...

Remote and automated IIS 7 management from build server - permissions issue

Here's the scenario: Win2003 Build Server (CCNET) IIS7 target deployment server The various MSBuild tasks (Sdc.Tasks, MSBuild Community, MSBuild Extension Pack) for doing this (creating VDirs, setting AppPool properties) are not suitable for at least one or more of the following reasons: No support for IIS 7. No possibility to pass...

How can I debug (preferably in an IDE) an MSBuild script?

Hi, We use MSBuild quite extensively as part of our continuous integration process, and whilst it is incredibly powerful and we can do practically all of our build, test and deployment within it (utilising some custom tasks) - we've found that debugging it using tags is a pain and cannot always provide us with enough information. I've...

Force rules for build and deployment

Our web project is source-controlled with SVN. It contains MSBuild file to build local, test and production builds. We also use CruiseControl.NET to deploy production and test versions to servers manually (not after every commit). The question is how to check that if production deployment is being done using CC.NET web project is built ...

MSBuild / Visual Studio distributed builds

I develop / maintain an app that takes a long time to build (as in, a full build takes in excess of 6 hours!) After having spent most of the day building our app I've started looking into ways of improving build time. The suggesions on this stack overflow question were: Fixing compile warnings Unity builds (for developers) Distribut...

What in my CruiseControl.NET configuration is causing this exception?

In attempting to set up a build for a demo project I am working on, I received the following exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Documents and Settings\Administrator\Local Settings\Temp\1bea7440-959c-4dd4-89ad-05dcd00e369c\ThoughtWorks.CruiseControl.MsBuild.dll' Question: What don't I ...

How do I override CopyLocal (Private) setting for references in .NET from MSBUILD

Hi all, I have been wrestling with this for a few days and after tons of searching I can't find the path I should be on. What I want to do is set up an MSBUILD project that will build our entire .NET application (constst of 8 solutions, and maybe 250 projects split up between them) with a number of settings overridden from the individua...

Performance benefit to pre-compiling web application project set to be updateable?

Is there any performance benefit to pre-compiling an asp.net web application if it's set to be updateable? By setting the pre-compiler updateable flag it doesn't pre-compile the aspx, ascx, etc. so those still have to be compiled at run-time on the first page load. Everything else in an ASP.NET Web Application Project is already compile...

TFS MSBuild Strong name and code signing of assemblies.

I need to strong name and code sign my assemblies. I dont want to change anything in Visual Studio, all changes must be on the TFS Build server. Any know how I can do this? ...

How do I build a 3.5 solution with MSBuild 4.0?

Hi, I've been trying to move one of our projects to TFS 2010 Beta 2 to benefit from the new Agile process template and the Test And Lab Manager without moving to VS2010 yet (since it is missing CF support). The problem is that our .NET 3.5 Compact Framework projects don't build in Team Build 2010. It's complaining about a AddHighDPIReso...

Xslt task not working as expected

I have an XSLT transform that I developed in VS. It works great when I use VS to run it (via XML->Show Xslt Output). However, when I execute it via the MsBuildCommunityTasks Xslt task I get wildly different results. Specifically, the output is only the contents of a handful of elements I don't even reference in my XSLT. I guess the def...

MSBUILD macro documentation?

I'm using MSBUILD macros in my .csproj files for AfterBuild events mainly just to copy files. I'm doing this by example, so the only ones I know of are the ones I've seen in use: SolutionDir, ProjectDir, OutputPath, and Configuration. Is there a list or good info page online anywhere so I can read up on what's available, what point in ...

VS2005 Web Deployment Project to VS2008 - ASPNET compiler errors

I'm having problems with a wdproj I've upgraded to VS2008; This is the error I'm getting while trying to compile the project using msbuild: ASPNETCOMPILER : error ASPRUNTIME: The precompilation target directory (C:\code\CCI\CORUS\Website\Website_DeploymentProject\TempBuildDir\) cannot be in the same tree as the source application di...

How do you format text in MSBuild?

Specifically, I am looking to zero pad a number to create a string based label. i.e. build 7 into build 007. You can easily add strings together, but in all my searches on formatting, padding, strings, etc... I have not been able to find any references. Example of what I am working with. <PropertyGroup> <FileParserVersion>File ...