Questions tagged [msbuild]
Microsoft Build Engine, also known as MSBuild, is a build platform for managed code and was part of .NET Framework.
msbuild
2,335
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?
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 ...
185
votes
24
answers
76k
views
Get Visual Studio to run a T4 Template on every build
How do I get a T4 template to generate its output on every build? As it is now, it only regenerates it when I make a change to the template.
I have found other questions similar to this:
T4 ...
131
votes
7
answers
61k
views
Conditional compilation and framework targets
There are a few minor places where code for my project may be able to be drastically improved if the target framework were a newer version. I'd like to be able to better leverage conditional ...
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\...
175
votes
6
answers
115k
views
How do I get .NET Core projects to copy NuGet references to the build output?
I'm trying to write a plugin system with .NET Core, and one of my requirements are to be able to distribute the plugin DLL along with its dependencies to the user for install.
However, I can't figure ...
134
votes
16
answers
224k
views
NuGet behind a proxy
I figure out that NuGet allows proxy settings configuration since 1.4 version (June 2011). But, I can't find any command line example.
I'm trying to run some build and NuGet can't connect.
How do I ...
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 ...
65
votes
7
answers
37k
views
Detect target framework version at compile time
I have some code which makes use of Extension Methods, but compiles under .NET 2.0 using the compiler in VS2008. To facilitate this, I had to declare ExtensionAttribute:
/// <summary>
/// ...
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 ...
152
votes
7
answers
113k
views
Should I compile with /MD or /MT?
In Visual Studio, there's the compile flags /MD and /MT which let you choose which kind of C runtime library you want.
I understand the difference in implementation, but I'm still not sure which one ...
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 ...
78
votes
8
answers
145k
views
VS2010 How to include files in project, to copy them to build output directory automatically during build or publish
Task is to form Visual Studio 2010 project so, that during any build or publish some foo.exe utility should be copied to output (bin) directory.
Early I have made PostBuildEvent task in .csproj (...
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 ...
134
votes
25
answers
129k
views
Running MSBuild fails to read SDKToolsPath
Howdy, I'm having a bit of an issue runnning a NAnt script that used to properly build my .Net 2.0 based website, when compiling with VS2008 and it's associated tools. I've recently upgraded all the ...