Questions tagged [msbuild]
Microsoft Build Engine, also known as MSBuild, is a build platform for managed code and was part of .NET Framework.
msbuild
15,160
questions
590
votes
9
answers
123k
views
Compile Views in ASP.NET MVC
I want an msbuild task to compile the views so I can see if there are compile time errors at well... compile time. Any ideas?
475
votes
24
answers
418k
views
Microsoft.WebApplication.targets was not found, on the build server. What's your solution?
Trying to build my project on the build server gives me the following error:
Microsoft (R) Build Engine Version 4.0.30319.1
error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\...
439
votes
26
answers
335k
views
This project references NuGet package(s) that are missing on this computer
I have an ASP.NET MVC5 application that worked yesterday and now I am getting this error when I try to build:
This project references NuGet package(s) that are missing on this computer.
I have the ...
439
votes
16
answers
219k
views
Resolving MSB3247 - Found conflicts between different versions of the same dependent assembly
A .NET 3.5 solution ended up with this warning when compiling with msbuild.
Sometimes NDepend might help out but in this case it didn't give any further details. Like Bob I ended up having to resort ...
434
votes
22
answers
340k
views
Found conflicts between different versions of the same dependent assembly that could not be resolved
When I clean and then build my solution that has several projects, the output window reports that the build succeeded. However, when I view the Error List Window, it shows me this warning:
Found ...
300
votes
20
answers
179k
views
MSBuild doesn't copy references (DLL files) if using project dependencies in solution
I have four projects in my Visual Studio solution (everyone targeting .NET 3.5) - for my problem only these two are important:
MyBaseProject <- this class library references a third-party DLL file ...
243
votes
28
answers
528k
views
How do you get the current project directory from C# code when creating a custom MSBuild task?
Instead of running an external program with its path hardcoded, I would like to get the current Project Dir. I'm calling an external program using a process in the custom task.
How would I do that? ...
236
votes
13
answers
275k
views
How to Publish Web with msbuild?
Visual Studio 2010 has a Publish command that allows you to publish your Web Application Project to a file system location. I'd like to do this on my TeamCity build server, so I need to do it with the ...
220
votes
23
answers
239k
views
Path to MSBuild
How can I programatically get the path to MSBuild from a machine where my .exe is running?
I can get the .NET version from the Environment but is there a way of getting the correct folder for a .NET ...
219
votes
2
answers
184k
views
How can I install the VS2017 version of msbuild on a build server without installing the IDE?
Historically, this has been done with the Microsoft Build Tools. But it seems that the Build Tools may not be available for versions after 2015. The replacement appears to be the Visual Studio build ...
208
votes
10
answers
283k
views
How do I run msbuild from the command line using Windows SDK 7.1?
I'm setting up .NET 4.0 support on our CI server. I've installed .NET 4.0, and the .NET tools from the Windows 7.1 SDK.
On .NET 2.0 and 3.5, that just worked. With .NET 4, when I run the "Windows SDK ...
205
votes
8
answers
296k
views
How do I specify the platform for MSBuild?
I am trying to use MSBuild to build a solution with a specified target platform (I need both binaries, x86 and x64). This is how I tried it:
C:\WINDOWS\Microsoft.NET\Framework\v3.5>MsBuild ...
203
votes
34
answers
350k
views
The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider" could not be located
It's a WebApi project using VS2015.
Step to reproduce:
Create an empty WebApi project
Change Build output path from "bin\" to "bin\Debug\"
Run
Everything is working perfectly until I changed Build ...
200
votes
14
answers
99k
views
Displaying build times in Visual Studio
Our build server is taking too long to build one of our C++ projects. It uses Visual Studio 2008, running devenv.com MyApp.sln /Build -- see devenv command-line switches (although that's for a newer ...
200
votes
8
answers
156k
views
Link to all Visual Studio $ variables
I was having a look at $(Configuration),$(ProjectDir) etc. in Visual Studio 2008 for Prebuild events.
Is there a link to all of these variables with a definition for each one of them?