msbuild

How do I override InstallShield Path Variables when building with MSBuild?

I am building an InstallShield project using the InstallShield MSBuild targets. I have been struggling with overriding the path variables. Nothing I do seems to be picked up by the InstallShield build. The help page was not very... helpful. ...

I have a error building a .vdproj on msbuild with nant

I'm getting used to using nant for build releases. But I have started to use asp.net MVC, and i choice make the setup for installation with a .vdproj . But, when I call the: < exec program="${dotnet.dir}/msbuild.exe" commandline='"./Wum.sln" /v:q /nologo /p:Configuration=Release' /> in nant, my result is: [exec] D:\My Document...

Multiple Pre-Build Events in Visual Studio?

I've followed a blog post by Scott Hanselman for managing configuration with PreBuild Events and have it working fine. I now want to split up my configuration into a couple of different files, so need to exectue the command again before the build. The problem is the PreBuild event text all gets executed as one console command. How can ...

MSBuild stops on the first error when called inside NAnt script ?

I'm trying to build a VS 2008 solution in NAnt, but it seems msbuild stops the build process after the first compilation errror has occured. In MSBuild there is a "ContinueOnError=true" or "StopOnFirstFailure=false" attribute, but how to specify this in NAnt ? The failonerror="false"does not solve the problem: ...

MSBuild publish website with embedded resources

I'm using the command-line to call msbuild to generate a published version of a website using this command: msbuild.exe /t:ResolveReferences;Compile;_CopyWebApplication /p:OutDir=dir/bin/ /p:WebProjectOutputDir=dir/ /p:Debug=false /p:Configuration=Release Website.csproj This works fine other than the embedded resources not b...

Streamline .NET projects with Msbuild

Sorry for being somewhat vague but so is the project I'm leading now. I inherited a large body of various in-house tools and am trying to put unified build system around each one.Some of the projects we have (few dozen) are .NET-based web-projects C# mostly, some of these are web-services and some webapps. The apps were build over past 6...

MSBuild Task syntax for deleting files

I'm trying to write a MSBuild Task that deletes the Obj directory and PDBs from my bin folder on my production build scripts and can't seem to get it to work right. Does anyone have an example where they do this or similar, or a link to a simple example of removing files and a directory with MSBuild? ...

MSBuild required enviroment variables

I'm trying to setup .NET (C#) build from command line. Can someone just give me a list of environment variables that I need to set up in the MSDOS prompt before I can run MSBuild.exe from the command line. The path to MSBuild executable would be the most obvious example. I cannot rely on setting variables from MyComputer->Properties->Adv...

How to exclude Web Deployment Project from building when the configuration is Debug?

I have selected the configuration as 'Debug', and my WDP file has Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " everywhere, so as I understood it shouldn't compile, but still is compiling. What I'm doing wrong? I'm using Visual Studio 2008, if that matter. In other words, how can I make that WDP only compiles when...

Local Build Automation?

Working in a team environment, we have a Team Foundation Server that also contains a Team Build component. It is configured to automatically build all projects and solutions at specific times or on request. We develop a product that is built with several solultions that depend on eachother. When things have been changed in one solution,...

Reason why a VS 2008 project is being rebuilt each time

Is there a way to find out the reason why a project is being rebuilt each time a Build Selection operation is issued in VS 2008? I've tried to even remove all dependencies from the Build\Configuration Manager (unchecked the build column for all assemblies, but the one in question). I get the same result: the assembly is rebuilt each ti...

Failing Build because it can't find AL.exe

Here's an interesting problem that really has me scratching my head. I have a project that's being built in TeamCity. It's been working fine until a developer added a resource file to one of the projects with some strings for another locale. He's added the .resx file under the Properties folder next to the default one. Here's the error m...

Visual Studio Project: How to include a reference for one configuration only?

Env.: VS2008 C# project Hi, I need to build my app for use in 2 different environments. In one of those environments, I need to use a 3rd party DLL assembly. I could isolate the code that uses this DLL using #if blocks. But how do I conditionally include the reference to the DLL in the CS project file? Edit: womp has a good point in ...

Recommended build targets

I'm a solo developer looking into a tool such as MSBuild/NAnt to improve my build process. My project files are starting to get messy with post-build events and there are analysis tools I'd like to run some times and not others. I want to regain order and define everything into a build XML file. My thoughts for build targets are: Debu...

Integrating MSBuild into Visual Studio

I'm a solo developer running Visual Studio 2008 and looking into MSBuild to improve my build process. Almost all of the tutorials I've found so far have plenty of information about writing a build file. However I'm having a lot of trouble finding out how to integrate MSBuild into Visual Studio. Maybe MSBuild is only used with something ...

msbuild and subversion

Im trying to use msbuild to get the latest version of my code from my subversion repository. I'm trying to use the msbuild community tasks and in particluar the svn tasks to pull down the latest version of my code. I'm unsure which task(s) I need to use to achieve this (SvnClient, SvnUpdate) Currently my msbuild target looks like this ...

MSBuild task to execute an external MSBuild file

I'm trying to set up a MSBuild file which will invoke another MSBuild file and I'm wondering what's the best way to achieve this. We're using it in the scenario of where a build server downloads a MSBuild file which then depending on the parameters it'll execute the appropriate 2nd file. I know I can just use the <Exec Command="msbuild...

MSBuild passing parameters to CallTarget

I'm trying to make a reusable target in my MSBuild file so I can call it multiple times with different parameters. I've got a skeleton like this: <Target Name="Deploy"> <!-- Deploy to a different location depending on parameters --> </Target> <Target Name="DoDeployments"> <CallTarget Targets="Deploy"> <!-- Somehow indicate I w...

Launch x86 or x64 MSI from MSBuild bootstrapper

So I have a WiX based MSI that installs a handful of device drivers and therefore I have an x64 and an x86 version. The package also has a .NET 3.5 dependency so I'm generating a bootstrapper to do this and then launch the MSI. My question is if anyone is aware of a way to create a bootstrapper that will detect the platform it is running...

How can I speed up Visual Studio builds to match MSBuild parallel performance?

I encounter a noticable difference in the speed when building the same solution one time with Devenv and the other time with msbuild /m. This is my usage graph for Devenv (Visual Studio) This is the graph for msbuild /m As an information I have set the parameter "number of parallel build processes" in Visual studio to 4. Is there a...