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

Run an MSBuild target only if project is actually built

I have an MSBuild file that builds */.sln files (builds all .sln files that exist). The build uses the Build target, so if no changes were made to input files, no project should be built again. I would like to execute some custom target only if a…
lysergic-acid
  • 17,990
  • 18
  • 96
  • 194
7
votes
1 answer

how do deploy an msbuild zip package locally or remotely without requiring IIS involvement

I am in the process of creating an application to allow the automation of application deployments, (https://github.com/twistedtwig/AutomdatedDeployments#readme). The idea being that everything is in source control, application files, application…
Jon
  • 14,602
  • 28
  • 88
  • 126
7
votes
1 answer

How to get rid of msbuild warning MSB3644

When building a web project on a machine that doesn't have the SDK installed, you get this warning: warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or…
David Ebbo
  • 40,353
  • 7
  • 92
  • 112
6
votes
4 answers

How to tell MSBuild to publish many web projects into one directory?

I am running Automatic Builds with TFS 2010. In a solution I have more than one web applications which are all located under the same root directory - e.g.: RootDir -> WebApplicationProject1.csproj WebApplicationProject2.csproj ... When I…
Ivan Zlatanov
  • 5,026
  • 3
  • 26
  • 44
6
votes
1 answer

Logging Build messages with MSBuild 4.0

I am using MsBuild 4.0 in code, like so: var globalProperties = new Dictionary(); var buildRequest = new BuildRequestData(solutionPathAbsolute, globalProperties, null, new string[] { "Build" }, null); var pc = new…
James
  • 1,815
  • 1
  • 18
  • 28
6
votes
1 answer

Files in ItemGroup not detected by AfterBuild Target

What the question should have been: Here is the content of my ModuleCompilation.targets file :
Apollidore
  • 183
  • 8
6
votes
1 answer

MSBuild inline task reference is escaping parenthesis, sometimes

I am writing an inline task for MSBuild. It requires a reference to System.ServiceProcess.dll. The task works great if I hard-code the path to the System.ServiceProcess.dll file, like this:
Chris Nielsen
  • 13,966
  • 5
  • 45
  • 54
6
votes
1 answer

Is there a lint-like tool for MSBuild?

I've just learned the hard way that Visual Studio 2010 and MSBuild extremely lenient when it comes to which vcxproj MSBuild files they will successfully execute - they will overlook missing configurations for subtasks and single files and still…
Timo Geusch
  • 23,267
  • 4
  • 48
  • 70
5
votes
1 answer

How can I ignore optional parameter error on MSBuild 3.5

I am using Visual Studio 2010. I've donwloaded an updated class (i.e. UpdatedClass.cs) which has a method with optional parameter, such as: public void DoThis(bool aValue = false) {...} Using Visual Studio 2010, I am able to compile it. But I…
Junior Mayhé
  • 15,301
  • 26
  • 105
  • 157
5
votes
1 answer

Cruise Control .Net exception writing msbuild-results.xml

I have a cruise control server running a build on a VM. All I did was change the source control from Perforce to Git, and the build is now failing. CCNet Config
5
votes
3 answers

How to override a configuration property?

I am trying to do both Release and Debug builds on .Net v4.0, where I have a MSBuild project file rather than a solution file. I want to use the same build project file, but just override the Configuration property switching between "Debug" and…
pmcgrath
  • 783
  • 2
  • 8
  • 20
5
votes
1 answer

The target "_WPPCopyWebApplication" does not exist in the project

I am creating a build script to automate the publishing of our web projects to a testing machine. I have a msbuild script which successfully does this, however when it is running it generates an error for each project in the solution stating that…
Aesir
  • 932
  • 1
  • 15
  • 30
5
votes
1 answer

MSBUILD web deploy package does not include the project reference DLL's

When I try to create a package for web deploy using msbuild it only includes the projects dll. The package zip file or the temp directory does not include the referenced project's dlls. I've looked at this post and that is not my problem. I am…
Ben Anderson
  • 1,049
  • 2
  • 14
  • 34
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
  • 35,361
  • 15
  • 90
  • 155
1 2
3
20 21