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

how to set property value based on item and use that property as input of property function?

I am trying to set a property value based on Item But property doesn't seem to notice Item For example, my code is like %(temp.Identity)
in His Steps
  • 3,075
  • 6
  • 30
  • 38
1
vote
1 answer

ItemGroup inside Target does not execute

I am not able to understand this behavior: The item group is placed directly under project tag works fine:
surya
  • 991
  • 1
  • 12
  • 22
1
vote
1 answer

Change CSharp code at compile time based on Assembly being used

Test.csproj references System.XML and specifies TargetFrameworkVersion v4.0. System.Xml.XmlReaderSettings has gained a DtdProcessing Property, and deprecated ProhibitDtd in the meantime. The requirement is to build from one project, supporting both…
WaffleSouffle
  • 3,293
  • 2
  • 28
  • 27
1
vote
1 answer

Using external task to determine OutputPath

I'm trying to override the OutputPath parameter globally in a csproj by using an external task to get information regarding where I would like to store the final output. I created a task:
Roy Reznik
  • 2,040
  • 4
  • 22
  • 28
1
vote
2 answers

Count character ocurrences in a string in MSBuild

What's the easiest way to count the number of times a character ('\' in my case) appears in a string using MSBuild? I tried using Split(\) to no avail.
introiboad
  • 997
  • 1
  • 11
  • 18
1
vote
1 answer

msbuild Assembly number - Get wrong number

I have the following code in my CommonAssemblyInfo.cs using System.Reflection; using System.Resources; using System.Runtime.InteropServices; [assembly: AssemblyCompany("XXXX")] [assembly: AssemblyProduct("BuildVersionTest")] [assembly:…
1
vote
0 answers

Eliminate repetition in msbuild Targets? (especially repetition of item identifiers, which can't expand Property's in Exec Command attributes)

I would like to minimize repetition in my msbuild xml, particularly inside my Target's Exec Command attribute. 1) Most importantly, in the following Target I would like to un-duplicate the pair of "%(ShaderVertex.Identity)" constructs in the Exec…
1
vote
1 answer

Visual Studio: Can I make a property sheet's imports read only?

I have a property sheet in Visual Studio 2010 that imports some other property sheets. My property sheet's imports section looks like this:
loop
  • 3,460
  • 5
  • 34
  • 57
1
vote
1 answer

Parse ProjectDependency from .sln file

Project("{00000000-0000-0000-0000-000000000000}") = "Test Projects", "TestProjects", "{5FAF487E-B913-4D46-983E-CB13FDF36FCB}" EndProject Project("{11111111-1111-1111-1111-111111111111}") = "ProjPropHelperAPI",…
1
vote
1 answer

how does msbuild decide which tools to use?

I'm trying to setup a new TeamCity agent. My new agent is calling: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\CL.exe While the existing agents are calling: C:\Program Files (x86)\Microsoft Visual Studio…
Bill de la Vega
  • 101
  • 1
  • 8
1
vote
2 answers

Is there a way to execute a target for all projects in a solution within the IDE (no command line)?

Please hear me out as this question has been modified extensively. I have an msbuild target that I want to execute after each project in my solution is built from the IDE. I can easily do this by creating an msbuild replica of my solution, but you…
ATL_DEV
  • 9,256
  • 11
  • 60
  • 102
1
vote
0 answers

Building WP7 in TeamCity

I have been working to try and get my WP7 application building in Teamcity. To do this, I have managed to get the dlls and .target files requires for the application to build successfully. The problem I am having is when it comes to the Xap…
stack72
  • 8,198
  • 1
  • 31
  • 35
1
vote
1 answer

How MSBuild multitargeting works

I will try to explain this as clear as I can I want to fully understand how MSBuild multitargeting works. I have read several articles from Microsoft and I think I understand the basic but I want to be sure I am not missing anything. According to…
0
votes
2 answers

Pass Output items to separate target with MSBuild

I am creating a buildscript, where I'm outputting the TargetOutputs of an MSBuild, then wanting to call FXCop in a separate target, and using those outputs in the TargetAssemblies.
mickyjtwin
  • 4,960
  • 13
  • 58
  • 77
0
votes
1 answer

Build doesn't work from VisualStudio, but is ok from msbuild

From a brand new console application template in visual studio, I edited the .csproj to build another project like this: ...
CitizenInsane
  • 4,755
  • 1
  • 25
  • 56