msbuild

How to invoke the same msbuild target twice with different parameters from within msbuild project file itself.

Dear ladies and sirs. I have the following piece of msbuild code: <PropertyGroup> <DirA>C:\DirA\</DirA> <DirB>C:\DirB\</DirB> </PropertyGroup> <Target Name="CopyToDirA" Condition="Exists('$(DirA)') AND '@(FilesToCopy)' != ''" Inputs="@(FilesToCopy)" Outputs="@(FilesToCopy -> '$(DirA)%(Filena...

XmlMassUpdate - Replace Value Node

Hi Guys. I'm trying to use XmlMassUpdate to update my config files based on build Version type. There seems to be no documentation on how to update the new app.config (vs2008) settings formats anywhere. This is the config section: <applicationSettings> <CTC.Mica.ClientService.Properties.Settings> <setting name="PipeName" serializeAs=...

Using Cruise Control With No Solution Files

I've just joined a team that for whatever reasons do not check in their .sln files into source control (VSS). They Create their local solution files and add the web application projects to it from source control. I'm trying to show them the beauty of CruiseControl.Net however in the ccnet.config file i'm used to pointing the build tool ...

StyleCop integration with CI build process (Criuse Control, Nant, msbuild and StyleCop)

I have been asked to integrate StyleCop in our CI build process in such a way that: Individual project file in our (large) solution are not affected I don't have to use any 3rd party tool The first requirement (and I don't fully understand this yet) is due to the fact that we don't want to run StyleCop on our entire solution straight...

TeamCity & MSBuild integration

Is there any way to get TeamCity's build numbering to match the publish version (ApplicationRevision) number generated by MSBuild's publish task? ...

How do I deploy/publish a Web Application with CruiseControl.NET & MSBuild?

How do I deploy/publish a Web Application with CruiseControl.NET & MSBuild? I am new to CCNET and I able to get it to get the latest source from SVN and Build with MSBuild 3.5. How do I get the site to publish to another (DEVELOPMENT) server? Thanks for any pointers/examples. Cheers, ~ck ...

Problem in PropertyGroup using MSBuild tokens

Hi Guys - I am trying to setup some properties that i use multiple times in my MSBuild script. I have the following property section: <PropertyGroup> <BuildDependsOn>$(BuildDependsOn); MyAfterBuild </BuildDependsOn> <SubstitutionsFilePath>$(ProjectDir)app.config.substitutions.xml </SubstitutionsFilePath> <AppConfig>$(Targe...

Using UseHostCompilerIfAvailable=false makes VS to build already built projects over and over again.

Hi folks. I have recently learned of the UseHostCompilerIfAvailable option. I have set it to false hoping it will stop intermittent build failures on VS part (which never occur when building with msbuild on the command line). Well, builds do not fail, but now VS seems to completely ignore inter project dependencies. Meaning it always b...

AppController error: Index out of bounds

I overrode the following target in my TFS build file to run various tasks that set up databases, import data, etc., etc. in Visual Studio 2008 - the aim was to stop only the website associated with an application pool on the server instead of stopping the entire W3SVC service on the entire machine (see alternate task for example): <Targ...

CruiseControl.net build fails even through MSBuild task succeeds

Hi, I've installed CruiseControl.net for the first time and I'm having trouble getting my solution to build. It is strange because it builds in VS2008 just fine. I've got a very simple config file with this MSBuild task: <msbuild> <executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable> <projec...

Exclude folder from website build using MSBuild

We use MSBuild to build our solutions through CruiseControl. We have several assemblies and a website as part of the solution. Building through VS2008 the build is successful. However on the build box we get the following error. ASPNETCOMPILER (,): errorASPCONFIG: The CodeDom provider type "Microsoft.VJSharp.VJSharpCodeProvider, V...

MSBuild: build results shows 'no code coverage' while importing test-result does

I have a strange problem, my MSBuild runs tests, code-coverage and publishing fine (part of the build.txt shown): Results Top Level Tests ------- --------------- Passed BuildTestProject.UnitTest1.TestMethod1 Passed BuildTestProject.UnitTest1.TestMethod2 2/2 test(s...

XmlMassUpdate - how NOT to add xmlns ?

I'm using Nightly build 1.3.0.477 of MSBuild Community Tasks and I'm having problem with XmlMassUpdate. Here's what I want to do: for each project, if it does not reference CommonAssemblyInfo.cs file, add that reference. I'm doing it like this: <Message Text="Path is $(MSBuildCommunityTasksPath)" Importance="normal" /> <!---->...

Is it possible to use Team Build 2008 to build a VS 2005 solution targeting .NET 2.0?

What are the necessary steps I have to do to get Team Build 2008 to build a Visual Studio 2005 solution targeting .NET 2.0? ...

MSBuild delete process

I'm working on ironing out some problems with MSBuild on a large project. As part of a custom build target in our MSBuild setup we insert the .PDB files into Symbol Storeafter the build is successful. This works fine. However when we delete the old builds we also have to delete the .PDB files from Symbol Store, which requires a transacti...

try...finally equivalent in MsBuild

How can I run a certain cleanup task after my "Test" target runs, regardless of whether the Test target succeeded or failed (like the try...finally construct in C#/Java). ...

How to move onto automated builds with Visual Studio?

I work in at small .net shop where we currently build all our solutions using the visual studio IDE. We want to progress to a point where we're in complete control of our MSBuild scripts for build, test, deploy - making use of the MSBuild community tasks etc. I guess my question is: what will be different in Visual Studio development ex...

How to determine why visual studio might be skipping projects when building a solution

I am debugging someone else's work and the solution is quite large. When I try to build the entire thing, several projects within the solution don't build and just skip. Viewing the output window during the build process says: 1>------ Skipped Rebuild All: Project: pr1lib ------ How can I determine why these builds were skipped? I am u...

Private Accessor don't build when using MSBuild

My build server uses MSBuild to build my application. Our unit tests require access to some private members for testing, so we use the built in private accessors. Visual Studio has no problem with it, but when we push our code to the build server we get the error: MyTest.cs (96,13): errorCS0246: The type or namespace name 'My_Acc...

Unwanted Dependent Assemblies appearing in Bin\Debug folder

I have many different c# projects in a solution where one assembly is dependent on others. I have them all building in the correct order. I also have CopyLocal set to false for all references. However, when the builds of assemblies are done further down the stack, some of the assemblies are getting copied to the bin\debug folder. Why...