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
5
votes
2 answers

Use MSBuild Properties in T4 Templates

I am using MSBuild to generate some files using T4 and I was wondering if it would be possible to reference and use MSBuild properties within the T4 template? I want to do something like this snippet: Revision: <#=$(Revision)#> This throws an…
T4Dude
  • 51
  • 2
5
votes
2 answers

MSBuild ResolveProjectReferences Error

My MSBuild build script executes fine on all the development machines, but fails to run on the build server, except for the Trunk build. Branches all fail with the following warnings indicating the source of the problem: Target…
Paul Turner
  • 38,949
  • 15
  • 102
  • 166
5
votes
1 answer

Using WriteCodeFragment MSBuild Task

I am trying to use the WriteCodeFragment MSBuild task to create an AssemblyVersion attribute. I'm having a problem creating a property group to correctly pass the ITaskItem array required for processing. Can someone help with an example?
5
votes
2 answers

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…
David Williams
  • 823
  • 6
  • 16
5
votes
2 answers

MS Build Extension Pack with nuget fails to get MSBuild.ExtensionPack.tasks

I'm trying to install MS Build Extension Pack in order to use the compression task. I followed the instruction in the nuget web site -- i.e. I executed Install-Package MSBuild.Extension.Pack in the Package Manager Console. It created the…
Barak BN
  • 442
  • 6
  • 14
5
votes
2 answers

How to re-run property evaluation in MSBuild target?

I have a custom MSBuild target, partial snippet as follows .. $([System.IO.File]::ReadAllText($(PublishHtmTemplatePath)))
Jon Davis
  • 6,562
  • 5
  • 43
  • 60
5
votes
3 answers

how to publish my WCF Service Library using MSBuild Command Line in VS 2012?

I want to Publish my WCF Service Library using MSBuild Command Line with VS2012, i don't want to do right click->Publish Website , instead i want to publish it using Command Prompt(MSBuild). What are the Pre-requisites required for MSBuild? I don't…
Lokesh
  • 359
  • 1
  • 7
  • 17
5
votes
3 answers

How can I expose MSBuild 'Conditions' in VS2010 (for vc++)

I've got a custom build rule in VS2010 for my VC++ project. In this rule, I'd like to allow the users to add complex conditions on whether the file is processed. This also needs to be evaluated at the time of the target execution rather than in the…
Grant Peters
  • 7,691
  • 3
  • 45
  • 57
5
votes
4 answers

How to specify MSBuild version in nant script?

I have a nant script that in one of its targets uses the msbuild tags to build a Visual Studio 2010 solution. The problem is it fails when it hits this point, the error is: Solution file error MSB5014: File format version is not recognized. MSBuild…
Mike
  • 1,246
  • 3
  • 20
  • 34
5
votes
1 answer

How do I make MvcBuildViews continue to other views on error?

I've got a handy visual studio external tool shortcut to build the current project with MvcBuildViews enabled. Arguments: /m:2 $(ProjectFileName) /p:MvcBuildViews=true Command Line: C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /m:2…
Maslow
  • 18,464
  • 20
  • 106
  • 193
5
votes
2 answers

xcopy with MsBuild

I have a really simple build script that looks like this:
Pelle
  • 2,755
  • 7
  • 42
  • 49
4
votes
2 answers

error MSB4064: The "OverwriteReadOnlyFiles" parameter is not supported by the "Copy" task

I am using Msbuild 4.0. When i was using Msbuild 3.5 OverwriteReadonlyfiles worked without any issue. But today when i was trying to use the copy task i am getting this issue. error MSB4064: The "OverwriteReadOnlyFiles" parameter is not supported …
Samselvaprabu
  • 16,830
  • 32
  • 144
  • 230
4
votes
2 answers

How to measure the build execution time?

I am having build script in msbuild which will be invoked by powershell. Build log file would look like this. Build started 12/19/2011 2:01:54 PM. Build succeeded. 0 Warning(s) 0 Error(s) Time Elapsed 00:00:00.28 At starting point it will…
Samselvaprabu
  • 16,830
  • 32
  • 144
  • 230
4
votes
0 answers

Invalid static method invocation syntax exception while loading MsBuild project file

I created MergeSolution task for MsBuild. It is for merging multiple solutions into one solution file. I'm using PLINQ to to parse and process all solutions in parallel. I'm using my DisposableProject class to access project files inside every…
Ludwo
  • 6,043
  • 4
  • 32
  • 48
4
votes
2 answers

Output tag - TaskParameter and PropertyName, ItemName - what do this two include?

The msbuild contains output tag. It has avialable attributes: TaskParameter and PropertyName, ItemName. How they can be used? What are they containing? Please, can you help me to understand and give an example? For example you can use xmlpeek task…
truthseeker
  • 2,214
  • 6
  • 30
  • 53