Questions tagged [msbuild-4.0]

Third version of the MSBuild build tool (after 2.0 and 3.5), released as part of the .Net Framework 4.0. It is used by default by Microsoft Visual Studio 2010.

Third version of the MSBuild build tool adds support for property functions, new build extension mechanism, inline tasks, project multitargetting and a new API model.

315 questions
1
vote
1 answer

Microsoft.Build.BuildEngine ignores BeforeTargets

Building a project file with the Microsoft.Build.BuildEngine library seems to be ignoring the BeforeTargets attribute. My project file has the following target:
Tarmil
  • 11,177
  • 30
  • 35
1
vote
0 answers

msbuild environment variables not expanding on the command line

I need to build a solution from the command line using msbuild with one of the arguments taking an environment variable as part of the argument, however the variable is not expanding when it is executed. The command line I am using is…
MikeW
  • 1,568
  • 2
  • 19
  • 39
1
vote
1 answer

Replace a sign in a property

Lets say I got this AB_1.2.3.112211 in a property What I want is to exchange the first "." to a "_" So it becomes AB_1_2.3.112211 The two first characters could be longer fx ABCD_1.2.3.112211 but it should still be the output ABCD_1_2.3.112211 Is…
user1540911
  • 355
  • 1
  • 2
  • 12
1
vote
1 answer

MSBUILD script - Is this the proper way to loop?

I want to run a custom task to compile .less files to .css before packaging the application (.net mvc 3). I don't have a lot of experience creating MSBUILD scripts so by reading online I came up with code below. It works, but I feel like there…
qbantek
  • 685
  • 12
  • 32
1
vote
1 answer

FTP Credentials for MSBuild.ExtensionPack.Communication.Ftp

In my AfterBuild script I use the following method to upload the files to the deployment…
1
vote
1 answer

Wildcard import using Import Tag

Is it possible to do a wildcard import like: Like we normal do with items?: We have been trying but we get the following error: error MSB4025: The project file…
1
vote
1 answer

Msbuild ItemGroup unexpectedly accumulates files to copy

I am writing an msbuild script to deploy multiple targets. I am trying to reuse some elements and am getting an unexpected behavior. When I run this proj file:
garrmark
  • 89
  • 1
  • 10
1
vote
2 answers

Running a build against multiple projects with different build arguments

I have a series of projects that need to be compiled and published, deployed to separate directories with separate MSBuild arguments. As it stands, I have separate builds for each. For example, project 1: MSBuild Arguments: /target:myTarget…
Paul Michaels
  • 16,185
  • 43
  • 146
  • 269
1
vote
0 answers

Code coverage results are not available in TeamCity

I am using TeamCity 7.1 with MsBuild build step running the following task:
1
vote
2 answers

Copy files kept on local machine onto a shared location on a remote machine using MSBuild

I have created a build file using MSBuild which builds solution and keep all the data into a folder. Now i want to copy all the data to a remote machine accessed via shared folder.
SharpCoder
  • 18,279
  • 43
  • 153
  • 249
1
vote
1 answer

Using MSBuildExtensionPack from a specific location (DLL reference)

I am trying to use MSBuildExtensionPack and read that I have to import the project by using: $(MSBuildProjectDirectory)..\MSBuild.ExtensionPack.tasks $(MSBuildProjectDirectory)....\Common\MSBuild.ExtensionPack.tasks It should not be necessary for…
1
vote
1 answer

Exec Task in MSBuild for execution of command on remote machine

I am using following command to install a service via MSBuild file. This works great But the above command install the service on local machine. I want to…
SharpCoder
  • 18,279
  • 43
  • 153
  • 249
1
vote
1 answer

Slow Cheetah AfterTargets="TransformAllFiles" works locally, not on build server

I am using Slow Cheetah to transform app.config file for a console app. During build I also invoke this application. Initially I used post-build event, but then I realized that Slow Cheetah transforms run after post-build events, so I used solution…
Sebastian K
  • 6,235
  • 1
  • 43
  • 67
1
vote
1 answer

MSDeploy publish via MSBuild copies all files instead of syncing files

I have the following build target set to do my deploys, as mentioned by Hanselman in his Tiny Happy Features #3 and as also noted in many other places as what I consider to be the recommended approach: msbuild my_web_application.csproj…
1
vote
1 answer

warning MSB8012 - Linker's OutputFile property value ()

warning MSB8012 I've read through many answers to people asking about this error, but none of them seem to have gotten such a problem as mine. I'm trying to use property sheets in my projects to save having to set up property settings every time,…
Deji
  • 760
  • 1
  • 10
  • 16