msbuild

In TFS, once I have the build definition setup, how to I modify the task list etc?

Hi, I setup my build definition, is that all I do when it comes to setting up my build using the Team Explorer GUI? It seems like the only thing for me to do now is edit the msbuild .proj file? Is there a GUI for this or its all hand editing from here on it? ...

Programtically Reloading a C# Project

HI Does anyone know if its is possible to programatically reload a C# project , in one of my previous questions i needed to add all the CS files in a specific folder , now while this works i find that i have to reload the project every time to so that it can register the new files were added. So now i need a way to automtically reload ...

Aligning assembly version numbers with TFS Buildnumber

I am wondering if there is a way to synchronize the build numbers (20080213.1) without using the BuildNumberOverrideTarget where I would have to generate my own build number? I basically want to use the default/built-in tfs buildnumber generator but want to access it to align my assembly versions with it. Can this be done and is it a sen...

How can I execute silverlight unit tests from the command line

I've a set of tests for a silverlight application that use Silverlight's test framework. I can execute these from within visual studio and they run beautifully. I can also build my code from outside Visual studio using MSBuild following the tips in Jeff Wilcox's blog post: http://www.jeff.wilcox.name/2009/01/silverlight-msbuild-tricks-...

Targetting different Frameworks using MSBuild gives problems with dependencies.

I have a little project, and I want to have 2 compiled versions of that project: one that is targetting the .NET 2.0 framework one that is targetting the .NET 3.5 framework All is going well; I've put my project under continuous integration (using CC.NET), and I've created 2 CC.NET 'projects'. One project for each target-framework. ...

How to send a custom email containing TFS Build status

I'd like to send a custom build status email during or after the TFS build, but it doesn't look like the actual compilation status, etc. is known until after the entire process ends. Does anyone know of a way to send a custom email (other than the built-in alert email) that has the true build status? ...

If my MSBuild script uses batching to "loop" on a target, do its dependencies batch as well?

See this MSDN post for some background: Using metadata to call a target multiple times with different parameters The solution put forward was to use metadata in a Task's Output attribute to force the batching of the task. It so happens that our build step is partitioned across a few targets. My requirement is for the dependencies to r...

How do you recursively call tasks in MSBuild ?

E.g. I want to call these scripts passing diff params each time: <ItemGroup> <SqlFiles Include="$(SourceServicesDbSqlRootDir)CreateScripts\$(SourceServiceName)\Tables\*.sql" /> <SqlFiles Include="$(SourceServicesDbSqlRootDir)CreateScripts\$(SourceServiceName)\Functions\*.sql" /> <SqlFiles Include="$(SourceSe...

.Net Deployment Project's Detected Dependencies magically un-excluded

I have a Visual Studio 2005 .NET solution that has 20+ sub projects including a deployment project. The VS2005 .NET deployment project has a number of detected dependences, that have been manually excluded and corrected values manually added in. Sometimes however, these detected dependencies get magically un-excluded, which triggers a ...

Best way to integrate StyleCop with TFS CI

I've been doing research on how to enable source analysis for the project I'm working on and plan to use StyleCop. The setup I have is a TFS Server for source control, using TFS Continuous Integration. I want to enable source analysis for CI builds and daily builds run on the build machine, and not only for those run on developers' machi...

Delphi MSBuild Build Configurations From Command Line

Delphi 2009 uses build configurations. When you create a new project you have two default build configurations "Debug" and "Release". Now I asked myself how to automate builds using MSBuild (which is supported by Delphi since version 2007). You can start the "msbuild" command in the "RAD Studio Command Prompt" in some Delphi project di...

What is the point of MSBUILD/NANT if you are just going to write procedural code? Isn't Powershell better?

I am currently writing a deployment script in MSBUILD, and after downloading several extensions, I have found myself looking at the build file and thinking: What was the point in doing this in MSBUILD? This deployment script is completely procedural: stop website, delete folder, copy files, change permissions, start website, etc. There...

Conditional compilation with automated builds in Visual Studio

Here's what I'm trying to do: A single build script That script builds two executables from the same Visual Studio project. The first compiled .exe has a small amount of code disabled. The other compiled .exe has everything enabled. I've been reading up on conditional compilation and that takes care of my needs as far as enabling/dis...

Is It Possible to Update a WCF Service Reference in a Web Deployment Project

I think the question title neatly sums up what I am after. I have a web app and a service and I would like the build script to check if the service has been updated since the last build and if so, run the "update service reference" script that is available when you right-click on a service. Any ideas? ...

How can I create custom sections in TFS build reports?

I know how to add custom BuildStep task; however, it would be nice to create a new section, similar to the Summary and Build Steps sections. We are selectively deploying the files on a successful build based on the difference between the workspace and destination environment. We do create an HTML and XML log of the files we move and the...

Any way to keep myself from accidentally building in the wrong Visual Studio configuration?

In Visual Studio, I have custom MSBuild actions for various tiers - development, staging, testing, and so on. These scripts will automatically compile everything, do web.config swapping, and push code out to a location based on the chosen configuration. Usually when I want to run one of these builds on something other than development, I...

Getting MsBuild to build all the solutions in sub folders

I've got a directory that contains multiple VS solutions. There are solutions added on a regular basis and I would prefer not to maintain a solution that contains all the other solutions. Is there a way to get msbuild to find all the solution files in the subfolders of a given folder and build each solution? ...

Using xcopy to copy files from several directories to one directory

Is it possible to use xcopy to copy files from several directories into one directory using only one xcopy command? Assuming that I have the directory tree root\Source\Sub1\Sub2 I want to copy all .xml files from the directory root\Source including sub folder to root\Destination. I don't want to copy the folder structure, just the fil...

msbuild exec task with for

I am trying to run the following commands as part of a msbuild script: for /R . %f in (*.targets) do copy /Y "%f" "C:\Program Files (x86)\MSBuild\Microso ft\VisualStudio\TeamBuild" The commands is implemented in an exec the following way: <Exec WorkingDirectory="$(SolutionRoot)" Command="for /R . %f in (*.targets) do copy /Y &quot;%f...

running msbuild without having VS installed

Hi, I'm trying to run msbuild on a solution that has some C++ code in it. I have the SDK installed but not Visual Studio. I get the following error: error MSB3411: Could not load the Visual C++ component "VCBuild.exe". If the component is not installed, either 1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Framew...