msbuild

How to generate PDB's for .net managed projects in release mode?

I know PDBs are generated for managed projects in .NET by giving the compiler the /debug argument. Is there a way to specify this in the VS (2005) GUI? The only way I could get it to generate PDBs in release mode so far is to manually modify the .csproj file and to add : <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> ...

NAnt <msbuild> custom output directory

I'm new to NAnt and have been able to create a which 1) Deletes any code from the current folder 2) Exports fresh code from SVN 3) Builds the code in the default directory which is the PrecompiledWeb folder (its a web app) Here it is: <target name="export" description="export code from svn"> <delete dir="${Delete.Dir}"></delete> ...

project does not contain a configuration called 'Debug|x64'

Hi, I'm trying to build a C++ project with a build configuration platform of x64. It's on a new machine running a 64 bit Windows Server 2008. When I open the build configuration manager in VS, I can't chose or create the x64 platform and the project gets skipped. When I try to build it with MSBuild I get the error: VCBLD0004: Project 'M...

MSBuild on Visual Studio Command Line

I am trying to call msbuild on a .sln with a post build build-event something like: xcopy "$(TargetDir)$(TargetName)*" "C:\TEST\" /Y. Can I do that in just one line??? Basically I want to have something like: msbuild Solution.sln xcopy "$(TargetDir)$(TargetName)" "C:\TEST\" How can I do that? ...

Setup of TFS 2008 for automated testing.

I'm confused. I have TFS installed on my development server, which also doubles as the build machine. The builds work fine when I check-in code, but when the build attempts to run the tests I get an error: MSBUILD : warning MSB6004: The specified task executable location "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest....

VS2005: How to automatically generate a build number with date?

I have a .net 2.0 C# application in Visual Studio 2005 for which I'd like to automatically generate the correct version build number which should contain a number that allows me to guess the build date of the application. I tried to use the 'AssemblyInfo Task' tool from Microsoft but by default this tool doesn't work. For today it would ...

Visual Studio msbuild

I have a question regarding the commandline options of msbuild. I am currently using msbuild to build projects using the existing solution files. These solution files have references to external dll which have different paths on each machine. I am currently writing a build script and passing the specific path to the project file via the ...

Where should I store common targets for team builds?

I am trying to set up a common.targets file with some common msbuild targets I want to use in my team builds and therefore import into my TFSBuild.proj files. I am wondering what is the best way to achieve this? Do I need to store common.targets right next to each TFSBuild.proj file and therefore having duplicates of the targets file for...

When should copy-local be set to true and when should it not?

I am wondering if there are any heuristics for when to set copy-local=true for references? If referenced types are only used internally can I set copy-local to true but if referenced types are exposed as parameters or return values I set copy-local to false and indicate that a specific version of the dependency should be referenced when...

MSBuild Copy task not copying files the first time round

Hi, I created a build.proj file which consists of a task to copy files that will be generated after the build is complete. The problem is that these files are not copied the first time round and I have to run msbuild again on the build.proj so that the files can be copied. Please can anyone tell me whats wrong with the following build.p...

Does Msbuild recognise any build configurations other than DEBUG|RELEASE

I created a configuration named Test via Visual Studio which currently just takes all of DEBUG settings, however I employ compiler conditions to determine some specific actions if the build happens to be TEST|DEBUG|RELEASE. However how can I get my MSBUILD script to detect the TEST configuration?? Currently I build <MSBuild Projec...

How do I share a property between several TFS build scripts?

I have 3 build scripts that create separate components of a distributed suite of applications. They are stored in a folder structure like the following: LegacyComponents - VB6 code that is "live" but in the process of being replaced NewComponents - Rewritten components in C# Database TeamBuildTypes └ LegacyBuild └ NewBuild └ DatabaseB...

Visual Studio, MS Build

I am trying to build multiple .sln files inside a batch file. Everything works great so far. I am trying to add a check inside the batch file, so if number of errors is greater than 0 then the batch file stops executing and doesn't build the next .sln files. How can I do that? Basically something like: msbuild test.sln (check if build e...

How to get the value of a msbuild property from a custom task?

Is there some way to access the value of a msbuild property from a custom task? I know I can send them all in, but it would be nice not to :) Trying to do this from a tfs build. Or is there som way to access the "build script" currently running? Maybe like an object model and from there get what I need? ...

What should go in an MSBuild Script except compilation?

I'm currently trying to set up CruiseControl.net, and so I wonder how to split up my Tasks. Generally, I want to run Unit Tests (xUnit.net), Help File Generation (Sandcastle) and FxCop. Now I just wonder if I should specify a new Target in the msbuild config ("Documentation") and use that to run SandCastle, or if that belongs in a sepa...

Integrating Wix with MSBuild

Hi, we are looking to automate an MSI generation for a product we are developing. Currently we have MSBuild building out the source to a network location, this is fine for testing but when it comes to releasing the software we will need to wrap it in an MSI. The software is all .Net bar 1 COM component that will need registered on eac...

Running builds using .net 3.5 MSBuild and NantContrib

I noticed that projects that were originally created in VS 2008 do not compile using the nantcontrib msbuild task. There is a solution that I've seen here but it seems like a bit of a hack, considering 'MSBuildBinPath' has been depricated, and I don't exactly like the idea of changing this property on every single project file that I cre...

msbuild SLN and still get separate project outputs?

I have a normal SLN file, and I'm compiling it fine with msbuild from the command line. I do this: C:\slndir> msbuild /p:OutDir=C:\slnbin\ And it dumps everything into C:\slnbin, except for websites, which get deployed to C:\slnbin_PublishedWebsites\. What I would like is to not only have all the binaries dropped in the bin dir, but a...

Build System for .NET with a Make/Rake-like syntax?

A Build system with .NET devs as its Primary Target Audience that is does not have an XML-only Syntax? ...

msbuild and cruiscontrol.net

Hi, I am trying to call a batch file insdie cruisecontrol and all the batch file does it calls msbuild on a .sln C# project. I can't get this to work and I get the following error : 'msBuild' is not recognized as an internal or external command Any ideas?? Thanks ...