msbuild

How do I publish a Asp.net web application using MSBuild?

I am trying to publish an Asp.net MVC web application locally using the NAnt and MSBuild. This is what I am using for my NAnt target; <target name="publish-artifacts-to-build"> <msbuild project="my-solution.sln" target="Publish"> <property name="Configuration" value="debug" /> <property name="OutDir" value="builds\" /> ...

Is it possible to build MSBuild files (visual studio sln) from the command line in Mono?

Is it possible to build Visual Studio solutions without having to fire up MonoDevelop? ...

Best build process solution to manage build versions

I run a rather complex project with several independent applications. These use however a couple of shared components. So I have a source tree looking something like the below. My Project Application A Shared1 Shared2 Application B Application C All applications have their own MSBuild script that builds the project and all the s...

MSBuild ItemGroup, excluding .svn directories and files within

How can I construct a MSBuild ItemGroup to exclude .svn directories and all files within (recursively). I've got: <ItemGroup> <LibraryFiles Include="$(LibrariesReleaseDir)\**\*.*" Exclude=".svn" /> </ItemGroup> At the moment, but this does not exclude anything! ...

Executing different set of MSBuild tasks for each user?

In our development environment each developer has their own dev server. Often times they do not actually develop on that server but develop from their local machine, deploy to their dev server, and then attach with the remote debugger to do debugging. My question is; how can I use MSBuild to execute a different set of tasks for each us...

Any good PowerShell MSBuild tasks?

Anyone know of any good MSBuild tasks that will execute a PowerShell script and pass it different parameters? I was able to find B# .NET Blog: Invoking PowerShell scripts from MSBuild, but I'm hoping for something that is a little more polished. If I can't find anything I will of course just go ahead and polish my own using that blog p...

Displaying build times in Visual Studio?

Our build server is taking too long to build one of our C++ projects. It uses Visual Studio 2008. Is there any way to get devenv.com to log the time taken to build each project in the solution, so that I know where to focus my efforts? Improved hardware is not an option in this case. I've tried setting the output verbosity (under Tools...

Change .xla File with MSBuild

I'm trying to create a build script for my current project, which includes an Excel Add-in. The Add-in contains a VBProject with a file modGlobal with a variable version_Number. This number needs to be changed for every build. The exact steps: Open XLA document with Excel. Switch to VBEditor mode. (Alt+F11) Open VBProject, entering...

TFSBuild.proj and Importing External Targets

We want to store our overridden build targets in an external file and include that targets file in the TFSBuild.proj. We have a core set steps that happens and would like to get those additional steps by simply adding the import line to the TFSBuild.proj created by the wizard. <Import Project="$(SolutionRoot)/libs/my.team.build/my.team...

How do I change the build directory that MSBuild uses under Team Foundation Build?

I'm getting the following error when trying to build my app using Team Foundation Build: C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1682,9): error MSB3554: Cannot write to the output file "obj\Release\Company.Redacted.BlahBlah.Localization.Subsystems. Startup_Shutdown_Processing.StartupShutdownProcessingMessag...

Using AssemblyInfo to automatically update multiple AssemblyInfo.cs files

I've got several AssemblyInfo.cs files as part of many projects in a single solution that I'm building automatically as part of TeamCity. To make the msbuild script more maintainable I'd like to be able to use the AssemblyInfo community task in conjunction with an ItemGroup e.g. <ItemGroup> <AllAssemblyInfos Include="..\**\Assembl...

What name do you give the MSBuild project build file?

I am trying to learn how to use MSBuild so we can use it to build our project. There's what seems to be a very big hole in the documentation, and I find the hole everywhere I look, the hole being how do you name or otherwise designate the MSBuild project file? For example, the tutorial on MSBuild that can be downloaded from Microsoft...

How can I extend msbuild to run a custom preprocessor on .cs files?

I have a custom program which preprocesses a C# file and generates a new C# file as output. I would like to invoke this from msbuild on each of the C# files in the project, then compile the output files instead of the original C# files. How would I go about this? ...

Copy all files and folders using msbuild

Hi all, Just wondering if someone could help me with some msbuild scripts that I am trying to write. What I would like to do is copy all the files and sub folders from a folder to another folder using msbuild. {ProjectName} |----->Source |----->Tools |----->Viewer |-----{about 5 sub dir...

How can I disable work item creation at the end of a failed Team Foundation Build?

I'm using Team Foundation Build but we aren't yet using TFS for problem tracking, so I would like to disable the work item creation on a failed build. Is there any way to do this? I tried commenting out the work item info in the TFSBuild.proj file for the build type but that didn't do the trick. ...

What are the best books for learning MSBuild?

I am working to redevelop our build/deploy system, and in aid of this I want to get a book that will cover what I need to do. We will be using MSBuild, followed up by MSDeploy (web app) upon completion. I have found exactly one book dealing with MSBuild, namely Deploying .NET Applications: Learning MSBuild and ClickOnce (Expert's Voice...

MSBuild doesn't pick up references of the referenced project

Hello, I bumped into a strange situation with MSBuild just now. There's a solution which has three projects: LibX, LibY and Exe. Exe references LibX. LibX in its turn references LibY, has some content files, and also references to a third-party library (several pre-built assemblies installed in both GAC and local lib folder). The third-...

MSBuild directory structure limit workarounds

Does anyone have a method to overcome the 260 character limit of the MSBuild tool for building Visual Studio projects and solutions from the command line? I'm trying to get the build automated using CruiseControl (CruiseControl.NET isn't an option, so I'm trying to tie it into normal ant scripts) and I keep on running into problems with ...

Advantages of using MSBuild or NAnt versus running DevEnv.exe from command-line

Can anyone explain what advantages there are to using a tool like MSBuild (or NAnt) to build a collection of projects versus running DevEnv.exe from the command-line? A colleague I had worked with in the past had explained that (at least with older versions of Visual Studio) using DevEnv.exe was much slower than the other techniques, bu...

Access a 2nd project in the same solution with MSBuild

I'm new to MSBuild, and am learning as I need to know how to do things. Currently, I am working form the MSBuild file that is generated from the Web Deployment Project extension for Visual Studio. I have been ab;e to access and manipulate files which are directly in my Web project by creating properties form this block of XML: <Proper...