msbuild

Merge 2x DOCX files into 1?

Hi peeps, I need to merge a whole bunch of docx files programatically. Imagine they are numbered 1 to 10. I essentially need a final.docx file that contains all 10 documents in it. If I can append the second to the first somehow, then I can repeat it for the third, then fourth, etc. Note that I do NOT need to rebuild a table of content...

How to resolve "Only one project can be specified" error from <msbuild> task in CruiseControl.NET

I'm trying to use the task in CruiseControl.NET version 1.3.0.2918 with a rather straight forward : <project name="AppBuilder 1.0 (Debug)"> <workingDirectory>c:\depot\AppBuilder\1.0\</workingDirectory> <triggers/> <tasks> <msbuild/> </tasks> </project> However, when the project is run it fails with this inf...

Installing a win32 service using MSBuild and Microsoft.Sdc.Tasks

I'm trying to install windows service using the Microsoft.Sdc.Tasks library. <ControlService Action="Install" ServiceName="Service1" User="XXX Password="XXX" ServiceExePath="$(DeployFolder)\XXX.exe"/> But I keep getting prompted for the user and password! This will not work as I'd like to have it as an automated build...

How to run MSBuild from Powershell without spawning msbuild.exe process?

I am considering running MSBuild from a Powershell script by tapping directly to the MSBuild assemblies (as opposed to looking up MSBuild install path and starting msbuild.exe as a child process). Has anyone done this? What would be the simplest, most straightforward way to run the build? Are there any pros/cons to either technique you'...

MSBuild 2008 stops on first error while building a solution

We recently upgraded from MSBuild 2005 to 2008. Since then MSBuild stops on the first error when building a solution. This wasn't the case in 2005. Is there a way to get the old behavior? EDIT: We call MSBuild form the command line: MSBuild.exe xyz.sln /p:Platform=Win32 /p:Configuration=Debug ...

ANT & MSBUILD

When running msbuild.exe with ANT's exec task, errors in the .net code do not result in the build process failing. Does anyone have a clue? ...

Msbuild task - Build fails because one solution being built in release instead of debug

I'm hitting a weird issue with msbuild, and I'm thinking it might just be an environment issue. We're using msbuild to build a number of separate solutions, and it seems to work on my machine. But on a couple other machines, it's not working. I've tracked down the issue, and it looks like one of the solutions (or one of the projects i...

simple Exec task in a BuildDef (tfsbuild.proj) in TFS and TeamBuild

This does not work (taken from tfsbuild.proj) when queued in BuildExplorer: Builddef for WFPApp1 . . . . . . . but this does (taken from the app1.csproj) and build/rebuild inside the VS IDE csproj for WFPApp1 . . . . . . in the first example, the build just seems to hang indefinitely until cancelled in the Build...

Nant or MSBuild, which one to choose and when?

I am aware there are other nant and msbuild related questions on stack overflow, but I could not find a direct comparison between the two and so here is the question. When should one choose Nant over MSBuild? Which one is better for what? Is Nant more suitable for home/open source projects and MSBuild for work projects? What is your exp...

msbuild, defining Conditional Compilation Symbols

I'm possibly just blind, but is there a command line to specify conditional compilation symbols in MSBUILD? I currently have this Line in my buildscript: SET MSBUILD=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe SET CONFIG=Debug %MSBUILD% /p:Configuration=%CONFIG% /p:OutputPath=..\..\output source\MyProject\MyProject.csproj...

Help with one step build all projects + installer (.NET + WiX)

I have prebuild events on the installer to rebuild the projects with the appropriate configuration etc. If I right-click build/rebuild on the WiX (3.0) project in visual studio it all builds fine, but if I try to run MSBuild on the wixproj file the pre-build events will throw errors. I can instead call Candle and Light on the wixpr...

How can I use SVNLook functionality on client machine

All I wish to call the svnlook commandline from my MSbuild script using the Exec command, however all the documentation I have read seems to indicate that this can only be run on the machine holding the repository itself (i.e. the server.) Does anyone know how I can access this functionality from the client machine, is there a client...

Creating .inf file from command line (using msbuild)

Hi, I would like to create .inf file (for creating .cab file) using msbuild command line. First I tried to rebuild the solution using VS IDE and it created .inf file which could be used to create .cab file (package for mobile device). Then I tried to create .inf file with msbuild with the following command: msbuild solutionName.sln /p...

define a preprocessor value from command line using MSBuild

I need to create a demo version of an existing large application consisting of multiple projects. I'd like to use the existing projects, and just neuter the functionality via preprocessor directives #if DEMO mycode.NeuterNow(); #endif We are building our app using MSBuild, and I'd ideally use something along the lines of: MSBui...

migration to TFS 2008, build no longer moves resource dlls to bin folder

We recently moved our source control from 2005 to 2008 and the web projects builds have stopped copying the resource dlls for referenced (project reference) resx files into the bin folder (they remain at the same level as _publishedWebsites). I cannot see anything different in the build (It is still set to Mixed Platforms) but at the _Co...

Optimizing Visual Studio solution build - where to put DLL files?

I found out that build time of C# solution with many projects gets much faster if you don't have "copy local" enabled everywhere. I did some tests and it seems that (for our solution at least) we could increase build time by factor 2-3 just by removing "Copy local". This probably means we have to store libraries in some common directory...

VB6 - How to automatically break compatibility from command line (or msbuild)

We're implementing Team Build and know we need to write MSBuild scripts to build our legacy VB 6 app. It's configured to use Binary Compatibility and we break Compatibility occassionally and we'd like our new automated build process to be able to Break Compatibility automatically. Anyone know how to do this or if it's even possible? Al...

How to email multiple address with MSbuild

I have a target in my build script that will send an email with an attachment detailing svn changes for a module. This works if I hard code a single email address however I now want to email multiple developers and the script is failing. Below is the code <Target Name="MailInformationUpdate" DependsOnTargets="ZipArtifact" Condition=...

Copy files from one project to another after build

hello, I have a project for all my javascripts in side (that i made common for three projects), I want upon build to move these scripts to the three projects, how can i do this by editing .csproject and how? Thanks ...

When do you need the Windows SDK for MSBuild?

I'm setting up my first build server for .NET 3.5 projects, and found this interesting line in the MSBuild log after a successful build of a simple test application: Could not locate the expected version of the Microsoft Windows SDK. Looked for a location specified in the "InstallationFolder" value of the registry key "HKEY...