msbuild

Generic MSBuild Script

I am trying to build a generic MSBuild script that will be called programmatically from ASP.Net page. This script should do the following: 1) Check out the source code (all projects are asp.net projects) from SVN. 2) Build and publish the web project. 3) Run a c# component which will do some manipulation on the published...

Can VS.NET 2010/MSBUILD produce XmlSerializers for .NET 3.5 SP1?

I just upgraded a VS 2008 solution containing WinForms, general use libraries, and a web app to VS 2010, but all projects still target .NET 3.5 SP 1. I use this technique to generate XmlSerializers for my general use libraries. The WinForms app runs fine. When my web app tries to run using these libraries that reference the same XmlSeria...

Can I call a MSBuild Task from Mono XBuild?

Can I call a MSBuild Task from Mono XBuild? http://msdn.microsoft.com/en-us/library/ms126274.aspx http://www.mono-project.com/Microsoft.Build ...

Problem when specifying build configuration in TFS2010 build definition

Allow me to start by saying that this is a new and first time TFS deployment with 0 experience in Visual Studio as an added bonus. I've managed to get everything installed and am excited to say that I can even deploy as part of the build process to our different staging environments, but this is where things have gone south. I'm trying ...

Using Code Contracts in library code built with MSBuild

I've started using Code Contracts in all new code I'm writing, such as in a framework library I'm building to help bootstrap IoC, O/RM, etc., in an ASP.NET MVC application. I've written a simple build script for this framework library that looks like the following: @echo off echo. echo Cleaning build output (removing 'obj' and 'bin' fol...

AfterPublish target not working

World's simplest task (see below) is not being executed after I publish my web application project. Any idea why? Thank you. <Target Name="AfterPublish">    <Copy SourceFiles="C:\A.txt" DestinationFiles="C:\B.txt" /> </Target> ...

StyleCop in MSBuild script. How make it output file only and no warnings or errors during build

Hi! I am using StyleCop 4.4.0 RTW. I have installed it, copied the contents to a version controlled directory and I've added it to each of my project files by simply adding this line to each .csproj-file: <Import Project="..\Library\StyleCop\v4.4\Microsoft.StyleCop.targets" /> The basic functionality seems to work. When I Build a pro...

Web Deployment Project With Nested Applications

I have a web application that I'm trying to create a Web Deployment Project for in Visual Studio 2008. My application also has a child web application. Both are web applications in IIS. I have added the Web Deployment Project so that I can automate the build process for this application. When I try to build the Web Deployment Project...

Issue with clickonce bootstrapper and msbuild

I have a CruiseControl .NET build server running on Windows Server 2003, and I am trying to build and publish my ClickOnce application using msbuild. Everything is working fine, except when I enable the bootstrapper of my ClickOnce application. When this happens, I get the following error in the DeploymentGenerateBootstrapper target: C...

ClickOnce PublishUrl not working using MSBuild Task

I have a CruiseControl .NET build server running on Windows Server 2003, and I am trying to build and publish my Wpf (3.5) ClickOnce application using msbuild 4. The task in my build script is as follows: <MSBuild Projects="src\TestProject\TestProject.csproj" Targets="publish" Propertie...

TFS build server

We are just getting started with TFS 2010 and migration from SVN and CruiseControl.NET to TFS. With cruisecontrol.NET we have a powershell script that does everything: copying, modifying, compressing files. Now my question is how we can integrate that script into the TFS build server? Modifying the solution or creating a custom msbuil...

Moving a file in MSBuild using relative path

I'm trying to move all files of a certain type to a directory relative to the file itself and I'm wondering if it's possible using MSBuild. Basically, I'm using the Microsoft AJAX Minifier to minify all Javascript and CSS files on my site. This outputs .min.js and .min.css files into the same directory as the Javascript and CSS files. ...

MSBuild and Debug.AspNetCompiler.TargetPath

I have a solution that contains an ASP.NET Web Site (file-based) project. I'm currently using the following command in my build script to build the entire solution: <pathtomsbuild.exe> /t:rebuild /nologo /p:OutputPath=..\some_dynamic_dir /p:NoWarn=1685 <solutionfilename> However, web site projects do not come with a ...

OutputPath is set to be bin\x86\release but shown as obj\x86\release when msbuilding?

in my csproj the OutputPath is set as the following: <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <DefineTrace>true</DefineTrace> <OutputPath>bin\x86\Release\</OutputPath> .... </PropertyGroup> in my nant script, I have this: <msbuild project="${demo.solution}"> <property name="Configuration" value="...

How can I change AssemblyProduct, AssemblyTitle using MSBuild?

I have an MSBuild script which compiles my existing solution but I'd like to change some properties of one of the projects within the solution at compile-time, including but not limited to AssemblyProduct and AssemblyTitle. Here's a snippet of my build script: <Target Name="Compile" > <MSBuild Projects="..\MySolution.sln" ...

Why is the 64-bit MSBuild loading 32-bit extensions?

I'm attempting to build a project using MSBuild (v4.0) on a 64-bit machine. For some reason, MSBuild is attempting to load a 32-bit extension, and I cannot figure out why. I've reduced the problem to the smallest set in order to demonstrate the issue. Using the following MSBuild project file: <Project xmlns="http://schemas.microsoft.co...

Converting Makefiles to MsBuild

I would like to know if there is good practices, good tools to move a bunch of windows makefile projects to some msbuid (VS 2010) format? If you think that' not a good idea to make it using a tool, maybe you do know something like a dependency analyser to make a checklist? ...

How to build a C# project without checking dependencies?

Given a Solution where: Project P1 has a reference to P2 P2 has a reference to P3 P3 has reference to P4 When you call msbuild this way: msbuild.exe /v:m "c:\mysolution\p1\p1.csproj" msbuild checks all project dependencies is builds dependencies if necessary. The typical output is: Microsoft (R) Build Engine Version 4.0.30319.1 ...

MSBuild failed at resolving COM reference. Why?

My build server suddenly stopped working. After I examined log files I found monster error message: error MSB4018: The "ResolveComReference" task failed unexpectedly. error MSB4018: System.ApplicationException: The directory name is invalid. (Exception from HRESULT: 0x8007010B) error MSB4018: error MSB4018: Server stack trace: er...

MSBuild: What is it, and when do I need it?

I seem to have missed Day 1 of MsBuild 101. I find myself asking "What does it do, what does it replace, and when do I need it?" since I can just hit F5 and compile my application. What is the bigger picture I'm missing? ...