msbuild

How do I exclude the contents of a directory but not the directory itself in MSBuild

I'm using a Web Deployment Project 2008 to build my web application. I'd like to exclude the contents of several folders from the build but keep the blank directory itself. However, if I do this <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\ImageCache\**\*.*" /> it will exclude the ImageCache directory itself. So how do I keep t...

Trigger build when another finished succesfully in TFS 2008

This is a feature I'm used to from TeamCity - I could specify that a certain build configuration will be triggered by the success of another build configuration. I could even pass the results of one build to another - but perhaps this is asking too much. I'm looking for a similar functionality in TFS2008, is there a way to set a trigge...

Error when executing MSBuild from NAnt and specifying a logger.

I'm attempting to execute MSBuild from a NAnt script (which is called by CruiseControl.NET). Since I'm calling MSBuild from NAnt instead of CC.NET, I'd like to specify use the XmlLogger so that I can still generate an MSBuild report for CC.NET. This is the nant target responsible for building our solution with MSBuild: <target name="com...

Sandcastle Help File Builder - how to change msbuild path?

I'm trying out Sandcastle Help File Builder. If I run the build from the gui I'm getting this error: C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" was not found This is because it's in C:\Program Files (x86) directory. So how do I configure to use that dir instead? ...

Continuous Integration with Mercurial, MSBuild, ASP.NET

I recently moved from Subversion to Mercurial. I'd like to setup Continuous Integration (CI), but I'm unsure how a DVCS CI differs from an Subversion CI implementation. I'd like to hear how others have implemented their DVCS CI implementations and what tool sets were used. ...

MSBuild Issue with .NET 4.0

When I use msbuild on a .NET 4.0 project it appears to attempt to build the project with .NET 3.5. I've got Visual Studio 2010 installed and the project will build just fine in VS. It seems like an easy problem, but i'm kind of stuck. So I use the command msbuild C:\ProjectPath\ProjectName.csproj and I get the error. Bu...

How to customise TFS2010 build to print a message in the log

Hi guys, I have recently migrated one of my solution from SVN+CruiseControl to TFS2010. My build definition is using the Defaul Template. And I would like to customise the template. Since I have never worked with workflows before I decided to start by printing a simple message in the build log. For this purpose, I have added a WriteBuil...

Automating builds with MSBUILD/TFS 2010/MSBuild.ExtensionPack

I need to create a build that is schedule from TFS 2010 and does the following: Get latest source Compile the project Check AssemblyInfo.cs files out and increment the version using Msbuild.ExtensionPack Check the files back in Deploy the Database project against a target database Run unit tests I am thinking of putting all these st...

MSBuild, clear out multiple files in a project

I am getting the following error when trying to clear out files within my project LC error LC0000: 'Could not find file 'E:\CI\BuildServer\RMS-Transition\Group\dev\Controls\Properties\licenses.licx'.' My MSBuild task looks like this... <Target Name="ClearLicenseFiles"> <ItemGroup> <LicenseFiles Include="..\**\*.licx"/> ...

CruiseControl.NET with a web deployment project

Hey guys, we're currently using a web deployment project to compile the projects in our solution and deploy our website. We'd like to move to using CruiseControl .NET to give us the abilities to automate the builds, add testing, and initiate/review them from a website interface. Currently the web deployment project has project referenc...

Best installer to integrate with TFS2010+MSBuild

So it looks like Microsoft's installer projects don't build with MSBuild. Which is what we are using with TFS2010. This means that that my dream of check in the code, continuous integration build-> installer are currently doused. I know people out there are doing it, so they must be using some other installer tech. I noticed VS2010 now...

Tfs2010 Build Number and Assembly File Versions & MSBuild targets

Hi all, I read John Robbins' article TFS 2010 Build Number and Assembly File Versions: Completely In Sync with Only MSBuild 4.0, and I'm wondering about the best way to go about integrating this. The download for the article has two files, one is a targets file and one is a proj file. The targets file has a number of tasks to scrape ...

How To Detect Files Which Aren't Being Used in My Build

Hi. I have a ton of files in my source repository which aren't even used in my build. I know a few of them, but I know that there are a ton more. Our build script is pretty antiquated and is a mish-mash of MSBuild, .BAT file, Perl and more. Can anyone tell me if there is a way to run my build, and then output a list of all the files ...

doing msbuild from the command line: getting errors for the referenced namespace 'Microsoft.VisualStudio.TestTools'

Hi, i'm compiling a .net 3.5 solution with msbuild with this line of code: msbuild.exe n:\temp\Thisnight.sln /p:Configuration=Debug /v:diag and it gives me this error: error CS0234: The type or namespace name 'UnitTesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?) ...

Anyone else notice that $(SolutionDir) resolves to ProjectDir when loading Wix projects into Vs2010?

I'm using Vs2010 and Wix 3.6.0917.0, for the record. I use the $(SolutionDir) property quite a bit in my .wixproj file, since I only ever build the installer as part of a solution build or as part of a team build, and never by itself. However, while building from the command line works just fine (both from cmd on the desktop and when bui...

ProjName.XmlSerializers.dll Framework version issue

VS2010. All projects in solution target .NET Framework version 3.5. For building on build server we use MSBuild with tools version 4.0. ProjName.Xmlserializers.dll assembly is generated after build, but: on my machine it references System.Xml version 2.0; on build server it references System.Xml version 4.0; as a result "This assembly ...

MSTest not being executed when run by Cruisecontrol schedule

Some background: Im trying to implement the integration of Cruisecontrol (2.8.4), MSBuild and MSTest on my current project (.Net 4.0 and VS 2010). I'm using MSBuild to build my solution and added a MSTest as AfterBuild Target into my .csproj files to run my unit tests: <Target Name="AfterBuild" DependsOnTargets="GetTestAssemblies" > <...

Visual Studio 2010 automated Database deployment

In Visual Studio 2010 there is a nice feature of the database project that allows you to deploy to a database as well as set up various environments based on your configuration (Build deploy etc) I Would like to integrate this into our automated build environment. Firstly by having the deploy script run after a successful build on my l...

Permission error when minifying JS/CSS from MSBuild output

I’m adding a post build task to run the Ajax Minifier (ajaxMin.exe) whenever a relase build of a project is conducted. I’ve added the code to the project to compress all CSS and JavaScript, but when triggering a build on the TFS build server I get lots of build errors in the BuildLog.txt with the message: error : The Microsoft Ajax M...

MsBuild: Get current directory of targets

I have a msbuild target and it has a Import tag like this: <Import Project="$(MSBuildExtensionsPath)\Company\Company.LifeCycle.targets" /> In contents of Company.LifeCycle.targets file, how can I get programatically the current directory (in this case is: C:\Program Files\MsBuild\Company) ?? I use VS 2008, .NET 3.5 Edit: I have seen...