msbuild-4.0

TeamCity MSBuild 4.0 Help

Hi guys, I need some help with my MSBuild file i created a while ago. All i want to do is build the solution, publish a project inside the solution and than copy the files to a directory At the moment when i set Teamcity to .net 4 msbuild, msbuild 4.0 tools and for 86 i get an error stating error MSB4067: The element beneath eleme...

Building a VS2010 solution from TFS2008

I have a TFS 2008 Build Agent that has been used to build .Net 3.5 applications. I now have a .Net 4.0 app which i want to compile on the same build agent. I have ensured that MSBuild 4.0 is installed on there and all the required componentry is also installed, but i am getting the following MSB4062 error when building: [Any CPU/Release...

"OutputPath property is not set" error occurs only when calling MSBuild in CCNET

I've made an MSBuild project that simply does an msbuild task with our solution file as parameter. I've defined a BeforeBuild target where I set some properties, and a Build target that executes the msbuild task. I've confirmed that no errors occured when building the msbuild script in the command line console. However, when I use it in...

TFS with different binaries folder for different projects

Hi, I've got a solution with Silverlight projects, a couple Web applications and some Windows service and their small Winforms test applications. When I build it using TFS it puts all binary files in the Binaries folder. It also creates a _PublishedWebsites folder where it puts the web applications ready for deployment. What I would l...

Dependency issue with MSBuild 4.0 when doing DllImport from C# into unmanaged C++ library

Explicitly setting dependency in VS2010 between unmanaged C++ project and C# project is honored in VS2010, but dependency is ignored in MSBuild 4.0. It is impossible to add a reference to unmanaged C++ project from C# project, afaik. How do i ensure correct build order if a solution contains unmanaged and managed projects? ...

Code coverage in-place instrumentation: Cannot fully backup the binary error

Can anybody help with this error in the log of my Team Build 2010 build? It only seems to occur when I have two build agents running on the same machine at the same time. Run has the following issue(s): Code coverage in-place instrumentation: Cannot fully backup the binary 'C:\Builds\3\MyProject\Binaries\MyProject.UserMan...

Building a solution with multiple projects and multiple configuration

Hi Visual Studio 2010 Premium, Native WIN32 MFC Project (no .net project in solution). We have a complex solution with 35 projects. We have many clients for that product and what we normally do was to create a separate configuration for each client. Configuration did not have any major changes except few #define and changes to output d...

Why can't MSBuild ToolsVersion 4.0 build older projects?

We're using Cruse Control to manage our build process. AS we convert vs2008 projects to vs2010, we're leaving the target framework set at 3.5 for web and class library projects. At this point we're not going through and converting all our solutions to vs2010; not if we don't have to. I recently updated the MSbuild project files that cr...

Mvc dll missing from Msbuild web deploy package

I create a web deploy package from Visual Studio 2010, Build Deployment Package. The items to deploy is set to "All files in this project". I install it on the server using Web deploy, via Import Application in IIS Manager. It installs, but when I Browse the website I get the yellow screen of death, Configuration Error "Could not load...

How to execute a MSBuild copy operation only on the build machine?

I want to perform some copy actions on the build machine (but not on the developer machines) after a build is performed and before the integration tests run. How do I do that? Perhaps, I should split the question up into sub-questions and give some examples. Question 1: What do I need to do so that the MSBuild script detects that ...

Reading registry key fails with MSBuild Extension Pack 4.0

I am using MSBuild Extension Pack 4.0 to do my local development deployment. When using the class MSBuild.ExtensionPack.Computer.Registry to read a registry key (to get an installation directory) it fails saying the path is invalid. I believe this is due to msbuild being a 32-bit process, so it can only see: HKEY_LOCAL_MACHINE\Software\...

MSBuild 4.0 failing on XMLQuery task (from MSBuild Community Tasks package) with error MSB4018

We use MSBuild to run a project which, among many other things, reads some values from an XML file by means of the XMLQuery task from the Community Tasks package. It worked fine under MSBuild 3.5 but when run under 4.0 it fails with the following message: error MSB4018: The "XmlQuery" task failed unexpectedly. System.Xml.XmlException: ...

MSBuild error when building <project> unrecognized

I have installed VS2010. I have a simple .build file which contains this. <?xml version="1.0"?> <project name="system" default="build"> <target name="build"> <exec program="C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe"> <arg value="C:\System\system.build" /> </exec> </target> </project> ...

MsBuild: Changing References from ProjectReference to Reference

In our environment, we have two in-house frameworks and a separate website. During development, the references to the in-house frameworks tend to be set tp project references. However, once we move to release, the in-house frameworks are installed into the GAC as they are used for multiple instances of the website on each server. All ...

Tfs2010 Build Number and Assembly File Versions & MSBuild targets

Hi all, I read John Robbins' article TFS 2010 Build Number and Assembly File Versions: Completely In Sync with Only MSBuild 4.0, and I'm wondering about the best way to go about integrating this. The download for the article has two files, one is a targets file and one is a proj file. The targets file has a number of tasks to scrape ...

Logging Build messages with MSBuild 4.0

I am using MsBuild 4.0 in code, like so: var globalProperties = new Dictionary<string, string>(); var buildRequest = new BuildRequestData(solutionPathAbsolute, globalProperties, null, new string[] { "Build" }, null); var pc = new ProjectCollection(); var result = BuildManager.DefaultBuildManager.Build(new BuildParameters(pc), build...

MSBuild: transform paths to namespaces

I have list of items like this: <ItemGroup> <ToCompile Include="clojure\core.clj;clojure\set.clj;clojure\zip.clj;clojure\test\junit.clj;"/> </ItemGroup> And I want to transform that to a list of items like this: clojure.core clojure.set clojure.zip clojure.test.junit Is there a way to do this with MSBuild transforms? I tried b...