msbuild

Is there a good tutorial on MSBuild scripts?

Hi. I'm working on a web application project, and I need to create a build script; a build script that I can trigger from my cruisecontrol server. Since nant has not been maintained for ages, I figure that MSBuild is the way to go. I need the build script to be able to Compile all assemblies Execute unit tests Run NCover analysis on...

MSBuild overwriting dependencies

Ok, so I've got a somewhat complicated problem with my build environment that I'm trying to deal with. I have a solution file that contains multiple C# projects which is built by a NAnt script calling MSBuild - passing MSBuild the name of the solution file and a path to copy the binaries to. This is because I want my automated build env...

How to invoke the same msbuild target twice?

Dear ladies ... and sirs. I have the following msbuild script: <?xml version="1.0" encoding="utf-8"?> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="All"> <PropertyGroup> ... </PropertyGroup> <UsingTask AssemblyFile="$(GallioTaskPath)" TaskName="Gallio.MSBuildTasks.Gallio" /> <...

TFSBuild:How to trigger a build only when a particular file is checked in?

We have a particular file, say X.zip that is only modified by 1 or 2 people. Hence we don't want the build to trigger on every check-in, as the other files are mostly untouched. I need to check for a condition prior to building, whether the checked-in item is "X.zip" or not.. if yes, then trigger a build, else don't. We use only CI bui...

StyleCop specific config / MSBuild & Visual Studio various behaviours

Hi, Here is a problem with specific StyleCop configuration. I've got a total of two Settings.StyleCop files in my Visual Studio .Net solution folders. The first is placed at the folder root with chosen rules for the team. As I want to disable some rules for a specific project, I've put another Settings.StyleCop file in the correspond...

Why does devenv.exe invoke VS2008's installer when called from an MSBuild script?

I have this nice little MSBuild-based daily build setup that I use on my personal projects. It checks out my code, builds it, then invokes devenv.exe on my project to build my VS setup project. It has always worked swimmingly, until, well, yesterday. Now, whenever it tries to invoke devenv.exe, the VS 2008 installer comes up, and I have...

How can I change the working directory for NUnit tests in Team City?

Hi, I am using Team City as the build server, and I have a msbuild build script to build and run integration tests for my project. However, Team City when running my tests decides to ignore the WorkingDirectory attribute on the NUnit task, and as a result my tests fail to initialize: [17:46:54]: [Project "MyProject.msbuild.xml.teamcity...

"ERROR MSB4040 There is no target in the project" when using msbuild+Delphi2009

I'm trying to automate the build of a project in Delphi 2009. I'm using msbuild with .net 3.5 I simply call: Z:\Server>C:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild "BestSellerAppServer.g roupproj" /target:Build And get this: Build started 27/08/2009 01:15:45 p.m.. Project "Z:\Server\BestSellerAppServer.groupproj" on node 0 (Buil...

Sign every executable with authenticode certificate through MSBuild

Hello, I have an authenticode certificate (.pfx) which I use to sign executables. How can I configure Team Build so that it signs every single executable (.exe, .dll, ...) automatically while building the project? ...

Include xml files as application files and not data files in ClickOnce

By default ClickOnce will include all .xml files as data files. This results in the xml files are deployed in a data directory and not in the application directory. Is there a way to generate the manifest from MSBuild/Mage that will include xml files as application files viz., not add the writeable="applicationData" attribute. ...

Is there a way to stop vcbuild's after the first failure?

I am running a vcbuild process as part of a buildbot. I would like the build to stop on the first failure, instead of continuing to build additional projects. It looks like msbuild has a StopOnFirstFailure property, but I do not know if this works with vcbuild or how to use it. ...

Installing an MSBuild extension

I have created a task for MSBuild that is to be used by developers and would like to create an installer to install the task and the associated .targets file into the MSBuild extensions folder in Program Files (usually C:/Program Files/MSBuild on 32-bit XP). To do this properly, I would like to ask the system for that folder location at...

How to exclude Post Build Jobs using MSBuild & Cruise Control.

We have a Library Project that we use for all our central reused code called "CentralLibs.dll" This library gets GAC'd on all our servers during deployment so to make things handier for the DEVs when they're working locally, theres a post-build event that auto updates their local GAC with the new DLL post build. cd $(ProjectDir)\bin\De...

Why are a visual studio project's command-line settings stored per user? Is it OK to check-in (and share) a .user setting file?

We're creating an application that understands some command-line parameters. There are some default's we would like to supply on the command-line when debugging, and these are easily set in the project settings as explained here. The thing is visual studio stores these settings in a *.csproj.user file, and the default settings for ...

Compile WebSite Project with NAnt

Hi, I have a website project in Visual Studio 2008. I would like to build this website using MSBuild. I use the following command to build the solution: msbuild.exe mysolution.sln /t:Rebuild /v:q After I ran the command, it creates a new folder called precompiled, creates a copy of my project, removes all code files and places 1000 d...

Include Files using Wildcard into a folder in Visual Studio

I am using <ItemGroup> <EmbeddedResource Include="..\..\resources\hbm\*.hbm.xml" /> </ItemGroup> to include a bunch of xml files into my C# project. Works fine. But, I don't want them in the "root level" of my project, I would rather see them in a subfolder in my project. For example, this file is included into a Mapping folder i...

Is there a User Interface for editing MSBuild Projects?

I work in a dev environment where we heavily use MSBuild - I find myself constantly having to edit my build csproj xml by hand. I hate this - there seems like there should be a nice UI for editing these files and performing common tasks. I would of imagined that a tab in Project Properties Pages in Visual Studio would have given me som...

How to copy a folder recursively with out overwriting the previous one

what i need is i have linked my project with the cruise control, so when ever a build happens i want to copy the bin folder to a seperate destination folder with version number. That is when the project build happens for the second time i dont want to replace the bin folder of the first build i want to save this with another version numb...

Overwrite properties with MSBuild

I want to declare three properties in my MSBuild file and overwrite one property with the value of another (depending on the target being called), but can't figure out how to do this. My build file looks something like this: <PropertyGroup> <DeployPath_TEST>\\test-server-path\websites\mysite</DeployPath_TEST> <DeployPath_LIVE>\\l...

aspnet_compiler and msbuild.exe question

Hello, I am pretty new to msbuild and aspnet_compiler. I am using aspnet_compiler to compile web application project. Now I just saw the MSBuild.exe and noticed that its builds my website into the /mywebsite/precompiledWeb folder. Now why do I need to use MSBuild.exe? Can't I directly use the aspnet_compiler to see if my website can b...