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.

311 questions
47
votes
5 answers

MSBuild deploy failing after upgrade to .NET 4.5

We recently upgraded our VS 2010 and .NET 4 application to VS 2012 and .NET 4.5. We have a build script to deploy the application on the test server. We have two boxes - one is Windows 8 with VS 2012 (fresh install) and other is Windows 7 with VS…
Achinth Gurkhi
  • 2,094
  • 3
  • 25
  • 43
28
votes
7 answers

error MSB4166: Child node exited prematurely. Shutting down

Sometimes my build fail with this error. 0>MSBUILD : error MSB4166: Child node "3" exited prematurely. Shutting down. It seems to be completely random and I've not been able to reproduce it at will. I'm running VS2010 Win7 x64 MSBuild 4.0 but…
Ludwo
  • 5,783
  • 4
  • 29
  • 48
28
votes
4 answers

Copy bin files on to Physical file location on Post Build event in VS2010

I want to copy my dll generated in bin folder to a file location on Post Build Event in vs2010. Can some one help me on that. Thanks
Praneeth
  • 2,429
  • 5
  • 27
  • 45
27
votes
5 answers

Build MSBuild target without dependencies

Is there any way I can tell MSBuild 4.0 to build a target, but ignore any dependencies? I just want to build that target itself, nothing else.
EMP
  • 51,372
  • 47
  • 157
  • 214
27
votes
3 answers

MSBuild build order

I have a large solution with more than 100 projects (C++, Managed C++, C#) and many of them depends on each others. I have a TeamCity server and I want build this solution there. When I build solution in VisualStudio everything goes fine, but with…
igofed
  • 1,312
  • 1
  • 8
  • 15
24
votes
4 answers

Where can I find Microsoft.Build.Utilities.v3.5

How can I get Microsoft.Build.Utilities.v3.5? I am using StyleCop 4.7 and it would seem that StyleCop msbuild task which is in Stylecop.dll has as a dependency Microsoft.Build.Utilities.v3.5. Do you know how can I obtain that dll? I mean what should…
pmanolov
  • 623
  • 1
  • 6
  • 19
23
votes
1 answer

Include referenced project's .config file

Rather than excluding a file from the referenced output of an assembly, I want to add one! I have a console application project (BuildTest1) that references a second class library project (ClassLibrary1). The Visual Studio solution looks like…
David Gardiner
  • 16,233
  • 16
  • 71
  • 115
18
votes
1 answer

Replace characters within an msbuild variable

I need to replace characters in a variable I am passing to an exec task within msbuild 4. Specifically, I need to replace all occurrences of backslashes \ with forward-slashes / in the $(MSBuildProjectDirectory) variable. eg:
grenade
  • 28,964
  • 22
  • 90
  • 125
16
votes
3 answers

MSBuild Inline Task - Reference non-standard Microsoft assemblies

I am using the new MSBuild Inline Task to leverage the TransformXml (XDT Transform) in the Microsoft.Web.Publishing.Tasks.dll assembly. Here's what my task (snipped) looks like:
kamranicus
  • 3,857
  • 2
  • 34
  • 51
15
votes
1 answer

How do I restore a property sheet to its default value?

Let's say I carry out the following steps immediately after first installing and opening Microsoft Visual Studio 2010: File -> New -> Project -> Win32 Console App -> Finish. Go to the Property Manager pane -> Expand Debug | Win32 -> Right click…
14
votes
1 answer

How to append conditional compilation symbols in project properties with MSBuild?

I am stuck in a situation where I have an MSBuild script that needs to read the conditional compilation symbols set in project's build property. I have the following code in my MSBuild script file
Afraz Ali
  • 2,442
  • 2
  • 22
  • 39
14
votes
1 answer

How to get all the metadata keys for any ItemGroup item?

Is there a way to get all the metadata keys associated with a given item? I want to do something like the following. Given: val1 val2 val3
Zain Rizvi
  • 21,625
  • 17
  • 82
  • 122
14
votes
5 answers

How to check if a MSBuild-Task fails if using ContinueOnError=true

I am running the MSBuild task with ContinueOnError=true:
Elena
  • 1,940
  • 1
  • 14
  • 21
13
votes
2 answers

When you import another msbuild file, what is the order of evaluation?

I have a shared properties file shared.properties.proj $(MSBuildProjectDirectory)\..\Shared Assemblies
Maslow
  • 17,665
  • 17
  • 96
  • 181
11
votes
3 answers

How to split string by multiple characters in MSBuild 4?

I have the following string called MasterVersion: 1.1-SNAPSHOT I need to split it by the . and the - so it becomes a string[] array called SplitVersion, i.e.: 1 1 SNAPSHOT I've tried everything I can think of including about a dozen variations of…
Ian Kemp
  • 24,155
  • 16
  • 97
  • 121
1
2 3
20 21