msbuild

TFS 2010: Is MSBuild going to be dead because of Windows Workflow?

MSBuild in TFS 2010 has been replaced by Windows Workflow 4.0. It means when you are creating a Build Definition, you won't have a TFSBuild.proj to edit instead you must edit a workflow to customize your build. BTW am I correct if I say Microsoft is not supporting MSBuild in TFS 2010 and learning MSBuild as a TFS 2010 Team Build adminis...

VSTS 2010 SGEN : error : Could not load file or assembly (Exception from HRESULT: 0x80131515)

Hi ! I am experiencing a strange issue with VS2010. We use TFS to build our API dlls and we used to reference them in our projects usign a mapped network drive that was fully trusted. We have been working like that for at least two years and everything worked perfectly. Today, I converted a webapp to vs2010 and when I compile it in Rel...

How to get VS2010 Web.config Transformations working from NAnt?

In my Nant file I've got (paths shortened): <echo message="#### TARGET - compile ####"/> <echo message=""/> <echo message="Build Directory is ${build.dir}" /> <exec program="${framework}\msbuild.exe" commandline="..\src\Solution.sln /m /t:Clean /p:Configuration=Release" /> <exec program="${framework}\msbuild.exe" command...

How to make msbuild ItemGroup items be separated with a space rather than semi-colon?

Dear ladies and sirs. Observe the following piece of an msbuild script: <ItemGroup> <R Include="-Microsoft.Design#CA1000" /> <R Include="-Microsoft.Design#CA1002" /> </ItemGroup> I want to convert it to /ruleid:-Microsoft.Design#CA1000 /ruleid:-Microsoft.Design#CA1002 Now, the best I came up with is @(R -> '/ruleid:%(Identity)...

msbuild and searching for text

I have a msbuild task that outputs to a file. Now I want to search that file for a certain text or regex expression and return true if it is there and false if it isn't any idea of a task that could do this for me? ...

Adding a new target type to msbuild: How do I refer to the itemname in the task rules?

I'm trying to add a task to build the COM proxy DLL after building the main DLL. So I created the following in a .target file: <Target Name="ProxyDLL" Inputs="$(IntDir)%(WHATGOESHERE)_i.c;$(IntDir)dlldata.c" Outputs="$(OutDir)%(WHATGOESHERE)ps.dll" AfterTargets="Link"> <CL Sources="$(IntDir)%(WHATGOESHERE)_i.c;$(Int...

Using MSBuild 4 command line to publish ASP.NET web application

In previous msbuild we used the target '_CopyWebApplication' in order to build and convert the source of a project into a published site, this worked OK, but wasn't ideal. In .NET 4, the publishing process is somewhat more sophisticated and additionally seems a bit of a black box to understand. Whilst packages look great, I cannot full...

How to use a specific Windows SDK with MSBuild?

I have a large project made of many C++ and C# projects, and a MSBuild (3.5) script to build the whole thing. This script is based on the VCBuild (C++ projects) and MSBuild (C# projects) tasks. It is regularly executed by a Continuous Integration server. I want to be able to select a specific Windows SDK (v6.0A, v7.0, v7.1...) to be use...

How can I pass a Visual Studio project's assembly version to another project for use in a post-build event?

I have a solution with 2 projects: My Application 1.2.54 (C# WinForms) My Application Setup 1.0.0.0 (WiX Setup) I would like to add a post-build event to the WiX Setup project to run a batch file and pass it a command line parameter of My Application's assembly version number. The code may look something like this: CALL MyBatchFile....

MSBuild: convert relative path in imported project to absolute path.

Short version: I have an MSBuild project that imports another project. There is a property holding a relative path in the imported project that is relative to the location of the imported project. How do I convert this relative path to be absolute? I've tried the ConvertToAbsolutePath task, but this makes it relative to the importing pr...

How to compile and build C# projects with Ant and Mono?

I am currently working on a project with both java and C# codes within. Java takes the major role in this project. However, C# still takes a small part in it. I am using Ant to build the projects, and would very much like to use it to build C# too. I have learned that it's possible to build C# under Ant with the help of Mono. Can anybod...

Visual Studio 2k8: specifying custom properties

Hello, I'd like to use custom build properties to drive the build process. Is it possible to specify them using Visual Studio user interface? I'd like to avoid editing the msbuild file every time I need to change the property. Maybe VS2010 has support for that? Thanks, ...

MSBuild: Add additional files to compile without altering the project file

After looking around I can't find a simple answer to this problem. I am trying to create an MSBuild file to allow me to easily use SpecFlow and NUnit within Visual Studio 2010 express. The file below is not complete this is just a proof of concept and it needs to be made more generic. <Project DefaultTargets="Build" xmlns="http://sche...

<msbuild/> task fails while <devenv/> succeeds for MFC application in CruiseControl.NET?

The Overview I am working on a Continuous Integration build of a MFC appliction via CruiseControl.net and VS2010. When building my .sln, a "Visual Studio" CCNet task (<devenv/>) works, but a simple MSBuild wrapper script (see below) run via the CCNet <msbuild/> task fails with errors like: error RC1015: cannot open include file 'winr...

Trying to exclude certain extensions doing a recursive copy (MSBuild)

I'm trying to use MSBuild to read in a list of files from a text file, and then perform a recursive copy, copying the contents of those directories files to some staging area, while excluding certain extensions (e.g. .tmp files) I've managed to do most of the above quite easily using CreateItem and the MSBuild copy task, whatever I do t...

Possible to reverse order of ItemGroup elements?

In MSBuild 3.5, is it possible to reverse the order elements in an ItemGroup? Example I have 2 projects. One can be built independently the other is dependent on the first. Each project references its specific items in a .targets file. project_A.targets <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt; <Ite...

TFS 2010 - Deploy to Multiple Servers After Build

I've configured TFS 2010 to do a build and utilizing the MSBuild arguments, have it deploying to a single server without any issues. /p:DeployOnBuild=True /p:Configuration=Development /p:DeployTarget=MSDeployPublish /p:MSDeployPublishMethod=RemoteAgent /p:MsDeployServiceUrl=http://&lt;insert&gt;/msdeployagentservice /p:username=<in...

MSBuild find value in file

So I run my task with ccnet and my task creates files. What is the best way to read the file and identify if there is a certain value in it from msbuild?? ...

Customizing the TFS 2008 build sequence to avoid compilation and deploy SSRS

I'm trying to create a CI process for SQL Server Reporting Services. I am fairly new to TFS but quite experienced with MSBuild. In the past I've used a combination of MSBuild with Team City so the whole build process is more or less custom. Here lies the start of my problems, as the solution I am deploying only contains Report Server p...

How to build a VS2010 C++ Project on a BuildServer

Hi! I've a .NET Solution with a managed C++ assemlby Targeting .NET 3.5 created with VS2010. The command: %windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe MyProject.sln compiles the solution on my dev machine. On my BuildServer I get this error: Build FAILED. "F:\CruiseControl.NET\Projects\MyProject\MyProject.sln" ...