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
3
votes
1 answer

Running XUnit tests with TeamCity using MSBuild

I am trying to get TeamCity to run XUnit tests as part of the build process. So I created a separate file - MyProject.msbuild - living in the same folder as the .sln file, which looks like this:
Rune Jacobsen
  • 9,907
  • 11
  • 58
  • 75
3
votes
2 answers

MSBUILD web deploy package zip file does not inherit permissions from parent folder

I'm creating a zip file from msbuild using the package target. It creates it fine and the folder I'm putting it in has permissions for a user that allows that user to have full control of the folder. However, when I remove the zip file, then run…
Ben Anderson
  • 1,069
  • 2
  • 16
  • 38
3
votes
1 answer

MSBuild fails on VB.NET lambda expressions

I have an issue with building a project using the MSBuild (ver 4) from the command line when declaring lambda expression like this: Private Sub Foo(ByVal s As String) Dim WL = Sub(str As String) If Not String.IsNullOrEmpty(str)…
KorVet
  • 63
  • 1
  • 6
3
votes
1 answer

How to check if a file exist and is empty in msbuild

I want to check if a file exist and is not empty in msbuild. How do I do that
Amin
  • 31
  • 2
3
votes
1 answer

Can't copy nuget file into destination when I use MSBuild Property Functions

I have two goals on my current task; increment the version number of a Nuget package version automatically, and copy the generated .nupkg file into a new folder after the build. With True inside my…
Ali Hus
  • 255
  • 4
  • 10
3
votes
1 answer

My project builds with MSBuild 4 but not with MSBuild 3.5 even though I'm targeting the same version of the .NET Framework (3.5)?

When I build my solution using MSBuild 4 it compiles successfully: C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe MySolution.sln Build succeeded. 0 Warning(s) 0 Error(s) But when I try to do the same using MSBuild 3.5 I get the…
macrobug
  • 666
  • 6
  • 16
3
votes
1 answer

Tfs2010 Build Number and Assembly File Versions & MSBuild targets

I read John Robbins' article TFS 2010 Build Number and Assembly File Versions: Completely In Sync with Only MSBuild 4.0, and I'm wondering about the best way to go about integrating this. The download for the article has two files, one is a targets…
bwerks
  • 8,651
  • 14
  • 68
  • 100
3
votes
2 answers

XmlPeek empty string causes failure

So in my targets file, I've got a line that looks like this: in "file.xml", I have:
Scott Brickey
  • 1,207
  • 12
  • 22
3
votes
2 answers

MSBuild error when building unrecognized

I have installed VS2010. I have a simple .build file which contains this.
MadeOfStars
  • 61
  • 1
  • 2
3
votes
1 answer

Clickonce Application file has reference to wrong deployment codebase path

I am using MSBuild to deploy my clickonce WPF app. After deployment, my application clickonce file(Myapplication.application) has the following node
Arshad Mohammad
  • 399
  • 3
  • 7
3
votes
1 answer

Condition using File::Exists not working

I currently create my first MSBuild-script. I've a tag "Folders" that findes all Directories in a given root path:
Sebastian Schumann
  • 3,204
  • 19
  • 37
3
votes
2 answers

Issue with using MSBuild to build and copy all outputs to a common folder

We are trying to write a msbuild script that will build the solution and copy over all the compiled binaries and dependencies over to a specific output folder. While the build script that we have does build and copy over the binaries to a common…
koder
  • 887
  • 9
  • 29
3
votes
2 answers

Profile guided optimization with MSBuild

How do I build a solution in MSBuild (command line only) with PGI/PGO without adding new build configuration to projects? I've tried to add command line parameter /property:WholeProgramOptimization=PGInstrument which looks OK, it creates PGD files…
kreuzerkrieg
  • 3,009
  • 3
  • 28
  • 59
3
votes
1 answer

Output Path and MSBuild

I have a solution with 9 projects. All references in each project have their CopyLocal property set to False. When I build it from VS, none of these referenced binaries are copyed to the output build directory. Similarly, when I build using msbuild,…
Tonks94
  • 31
  • 2
3
votes
1 answer

MSBuild fails to see environment variable that is set from build workflow

This is related to TFS 2010 Build System. Within our build workflow we set a couple of environment variables using the SetEnvironmentVariable method of System.Environment class. I have confirmed that this environment variable gets set properly on…