msbuild

How can task parameters be defaulted in MSBuild

In mytask.targets, I have something like: <UsingTask TaskName="DoStuff" AssemblyFile="....etc....."/> <PropertyGroup> <RequiredParamDefault>hello</RequiredParamDefault> </PropertyGroup> This task currently has a required parameter (which could be changed from required if necessary). When the task is used: <DoStuff RequiredParam="$...

VS2010 Web Deploy: how to remove absolute paths and automate setAcl?

The integrated Web Deployment in Visual Studio 2010 is pretty nice. It can create a package ready to be deployed using MSDeploy on a target IIS machine. Problem is, this package will be redistributed to a client that will install it himself using the "Import Application" from IIS when MSDeploy is installed. The default package created a...

MSBUILD 4.0 Fails on AJAX Extensions

We have a .Net 2.0 web app and are converting the solution and projects to Visual Studio 2010 (they were Visual Studio 2005). We are leaving the project targeting Framework 2.0. The app includes Ajax extensions. We did the conversion and can build the project successfully on the server using Visual Studio. However, when we attempt to...

Trouble with outputting msbuild variables

Hi, Fairly simple question i imagine but i can't seem to make it work. I'm trying to output the variable from one target, into the parent target which started it. For Example, Target 1 simply calls the task in file 2, and is supposed to be able to use the variable set within that. However i just can't seem to get it to work (wrong synt...

Why Do I See the "In Recovery" Msg, and How Can I Prevent it?

The project I'm working on creates a local copy of the SQL Server database for each SVN branch you work on. We're running SQL Server 2008 Express with Advanced Services on our local machine to host it. When we create a new branch, the build script will create a new database with the ID of that branch, creates the schema objects, and cop...

Problem building with MSBuild on Team Build

Hi, I have recently upgraded from TFS2005 to TFS2010 (and sub-sequently the team build server). I used to be able to get a team build on one of my solutions to work pretty easily, (see structure below) Solution |_Web Site | |_Bin | |_Other Files |_Project 1 |_Project 2 |_Project (n) Now, i can no longer get a build working cor...

TFS with different binaries folder for different projects

Hi, I've got a solution with Silverlight projects, a couple Web applications and some Windows service and their small Winforms test applications. When I build it using TFS it puts all binary files in the Binaries folder. It also creates a _PublishedWebsites folder where it puts the web applications ready for deployment. What I would l...

Do Web Deployment Projects work with x86 build configuration

I have a need to build a website and several DLLs that it references in an x86 configuration. To date we have been using Web Deployment Projects to create Zip files of the resultant site and all it's required files. We need to continue to use WDPs however, they seem to have problems with the x86 build configuration. In my project, when ...

Automate VS 2010 "Publish" Config File Substitutions

I'm using the config file replacement feature of Visual Studio 2010's "Publish" functionality, as described in this article. I want to automate this using MSBuild/Hudson. Does anybody know how to do this? I like how it works but if I cannot automate it I'll have to switch to XmlMassUpdate or similar. ...

Extract number from string in MSBuild

I would like to extract the number from a string in MSBuild. How can I do that using the built in tasks or the MSBuild.Community.Tasks? (RegexMatch might do, but how?) Example: I have the string agent0076 and I would like to get out the number, without the leading zeros: 76 ...

MSBuild on TeamCity Server can't find AL.exe

I'm having a problem on my TeamCity CI build server where during compilation I get the following error: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2342, 9): error MSB3086: Task could not find "AL.exe" using the SdkToolsPath "" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Window...

MSBuild generate files in d:\target, but not d:\target\_PublishedWebsites

When I use msbuild to build a web site project under command line msbuild website1.sln /property:OutDir=d:\target\ I just want the published files generated in directory d:\target, but not D:\target_PublishedWebsites. What can I do for that? ...

Teamcity 2 configurations merge and deploy

Hi Everyone, I have two teamcity configurations one becoming my common helpers and reuseable components and my other a website which uses the common project. I use a third configuration to publish to a test environment. When the third configuration is run i would like it to get the artifacts from the common project and merge them wi...

MSBuild OutputPath property and absolute paths

I'm trying to set the OutputPath value to an absolute path: <OutputPath>c:\Projects\xxx\Deployment</OutputPath> But I get this error: Error 17 The expression "[System.IO.Path]::GetFullPath(D:\Projects\xxx\trunk\xxx.Web.Deployment\c:\Projects\xxx\Deployment\)" cannot be evaluated. The given path's format is not supported. 1 1...

Read assembly version number in post-build event?

When I change the assembly information to lets say 1.0.0.1 i thought that i could read the version with $(Version) but it seems that it does not change? ...

MSBuild Build Sequence

Looking at this article from MS, I have a question about the SolutionToBuild section. <ItemGroup> <SolutionToBuild Include="$(SolutionRoot)\path\MySolution.sln /> <SolutionToBuild Include="$(SolutionRoot)\Scribble\scribble.sln" /> <SolutionToBuild Include="$(SolutionRoot)\HelloWorld\HelloWorld.sln" /> <SolutionToBuild In...

Editing existing word File with MS Build output

I am using msbuild to run an .proj file which reads the file name and version from a folder. I wish to extract all the output onto an existing word file at specific locations. For this I need to pass the file path along with text, cell position, table position, row position and overwrite parameters. Any Ideas as to how to proceed?? A...

How do I update an xml file with msbuild with two namespaces?

This msbuild below task can take into account one namespace, but in the case where I'm updating an mxml (flex) that has a mix of namespaces, can I use this task or another msbuild task to do the update? <XmlUpdate Prefix="fx" Namespace="http://ns.adobe.com/mxml/2009" XmlFileName="myFlexApp.mxml" Xpath="//mx:A...

Any way I can use GenerateBootstrapper class in c# code to generate bootstrappers programmly?

Hi, any one tried this before? ...

MSBuild command-line error - Silverlight 4 SDK is not installed

My MSBuild command line is as follows: msbuild e:\code\myProject.csproj /p:Configuration=Debug /p:OutputPath=bin/Debug /p:Platform=x86 /p:PlatformTarget=x86 The project builds fine on my development machine in VS2010 but not with the command above. I am running Win 7 64 - Bit. I'm getting an error that says I don't have the Silverli...