Click here to Skip to main content
15,887,214 members
Everything / MSBuild

MSBuild

MSBuild

Great Reads

by Sunasara Imdadhusen
MS Test Result Viewer is a free open source library to convert MS Test result (.trx) file into HTML. It is also allowed you to perform MS Test on your test container project (.dll) file. This utility will work with simple command line arguments to generate test report in HTML format with excellent U
by Miroslav Popovic
MSBuild database migrations/upgrades with backup and restore functionality
by Nick Polyak
Describes how to install dynamically loaded plugins as nuget packages
by wliao
Integrating list of custom types into the TFS build template

Latest Articles

by Sergey Alexandrovich Kryukov
MSBuild is a flexible tool, it can be used not only for Microsoft toolchains, and it can even be used for non-programming chores
by Nick Polyak
Describes how to install dynamically loaded plugins as nuget packages
by CodingCoyote
Tutorial using the Build Task NuGet Package Template with GitHub or `dotnet new`
by mvastarelli
How to organize unit-tests within a library without the need for a separate test library.

All Articles

Sort by Title

MSBuild 

13 Oct 2014 by Krishna Siva
HiI am working on a automating my deployment process with MSBuild for my mvc website. I build my solution, after that i follow steps till precompiling and I publish my project with web deploy. I can create a build aritifact (.zip file) but when I try to deploy that in my iis ( Clicking...
30 Apr 2020 by Member 10053160
I am creating patch for my application to deploy small changes to customer. In my application I have 100 .CSProject. Out of 100 library I made code changes in class library A, B, C and Library D is calling to A,B and C library. So Is there any...
30 Apr 2020 by RickZeeland
Maybe you can use this VS add-in: Versioning Controlled Build[^] You can read the CodeProject article where it mentions "Increment modified projects" under Batch Commands: Versioning Controlled Build[^]
19 Aug 2015 by virusstorm
I was recently placed on project that needs some tough love and care and one of my first actions is to setup continuous integration (CI). The problem I'm running into is the solution has a wide range of project types, all needed because of the way the application was designed, my MSBuild...
31 Mar 2022 by DoingWork
I am trying to make a single project file for both Linux and Windows OS. Building solution on Linux OS through visual code, facing following Error. ...
6 Apr 2017 by NadunS
I have cloned MSBuild source code from (https://github.com/Microsoft/msbuild) and followed below steps to build the project. Building MSBuild with Visual Studio 2017 >Install Visual Studio 2017. Select the following Workloads: -.NET desktop development - Desktop...
6 Apr 2017 by NadunS
Issue has been resolve by following below steps ,Jeff Kluge helped on this after raising this issue in GitHub(https://github.com/Microsoft/msbuild/issues/1947) Open Developer Command Prompt for VS 2017 Run cd /d C:\msbuildgit\msbuild Run git clean -xfd to clean the enlistment Run cibuild.cmd...
22 Jun 2015 by Southmountain
This tip shows how to build your own project file from scratch using MSBuild. It will deepen your understanding of project file made by Visual Studio IDE.
11 Oct 2013 by ASP.NET Community
Here's a few good places to start with MSBUILD, the new XML-based makefile system built into .NET. Basic Introduction to MSBUILD  MSBUILD MSDN
24 Nov 2015 by ergohack
Here is a trick to create a Visual Studio solution that simultaneously builds multiple platforms for targeted projects.
5 Jan 2018 by PrafullaVedante
Hi, I am migrating our VS 2008 solution to the VS 2017. Currently we have msvc90 include/src files in our repository. We just sync it to the build server.Hence we did not need to have a separate VS or WinSDK installation on the build server. We want to keep the same behavior after migration. ...
5 Jan 2018 by debasish mishra
winapi - How to get the Windows SDK folder in MSBuild? - Stack Overflow[^]
24 Jul 2020 by VD-Flash
Hello readers. I was having problem in building a project with MSBuild so I asked for a solution here. A humble person named Shao Voon Wong suggested me to use the command line tools which I could download from here. After looking at this I...
24 Jul 2020 by Richard MacCutchan
Yes. As Gerry suggests above, instead of asking whether things can be done, just try it and you will find the answer immediately.
23 Apr 2013 by marcofranssen
In this blog series I will explain to you how to set up continuous integration.
7 Oct 2014 by Yamin Khakhu
The article presents CI for Asp.net Application using CruiseControl.Net.
24 Sep 2013 by Leo Gan
A Target for MSBuild, which I use with BizTalk Deployment Framework (BTDF) for the BizTalk Server application deployment.
17 Jan 2023 by Nick Polyak
Describes how to install dynamically loaded plugins as nuget packages
6 Apr 2011 by Pete O'Hanlon
If you want to create MSBuild files, and only have Visual Studio solutions, take heart - there is a trick that will help you out.
21 Jun 2017 by Member 13272039
I have a solution developed in VS 2013 containing some 20 odd projects which used to build fine initially but now for past couple of days we are facing an issue where the build randonly hangs. I looked up in Task manager and noticed the process CSC.EXE is running but not doing anything...
21 Jun 2017 by RickZeeland
First thing I would do is check all running processes and close suspicious ones. Then check the Build order. Then check if there are no conflicts with x86 / x64 / AnyCpu. Rebuild all. If that fails then reinstall Visual Studio.
5 Oct 2013 by Iron-Eagle
I am interesting in writing custom logger for MSBuild and use it with VS 2012. But I did not found how, after that, can I call this logger from WITHIN VS 2012. I did not find any place where I transfer parameters to MSBuild, or can I set custom logger in VS 2012 preferences.Can someone help...
6 Oct 2013 by Richard MacCutchan
You probably need to look into the Visual Studio automation interface[^].
7 Oct 2014 by Dominic Burford
Deploying your WCF web service to IIS
14 Jan 2014 by Kevin Burek
Integrating GnuWin32 Flex/Bison preprocessing into the MSBuild build process under Visual Studio
19 Nov 2015 by tnkarthi
How can i create PE file manually.By using anyone of thesecsc.exemsbuild.exeildasmilasmby using command prompt.
19 Nov 2015 by Duncan Edwards Jones
Each of these takes source files and creates the PE file. The command lines are documented on MSDN - for example MSBuild[^] :-So - if you had a visual studio solution file called "myprog.sln" you can compile it by:msbuild myprog.sln /target:Compile
28 Sep 2011 by skumarn
Hi,I got below error while performing MSbuild automation for asp.net application with SVN using CruiseContro.NET. Please help me to rectify this error.https://202.63.108.3/svn/cruiseit/trunk/myfolder': SSL handshake failed: Secure connection truncated (https://202.63.108.3)
28 Sep 2011 by Arindam Tewary
Hi,Please refer to this postshttp://ubuntuforums.org/showthread.php?t=1511387http://ubuntuforums.org/showthread.php?t=1711656http://www.svnforum.org/threads/35175-SSL-negotiation-failed-Secure-connection-truncated
26 Mar 2019 by Member 14197773
I have the below MSBuild to generate .cs files from my proto files. The build works fine until I do a rebuild where it complains of Source file 'generated-proto-output/Trade.cs# specified multiple times. How do I delete my .cs files before building/rebuilding everytime? Error Severity Code...
26 Mar 2019 by RickZeeland
Maybe you can use a build automation tool like Cake, see overview here: https://www.slant.co/topics/4014/~make-based-build-automation-tools[^]
2 Feb 2015 by Pascal-78
Hi,I manage to build a custom build rule with VS2008 and upgrade it in VS2010.But I have a problem with the Outputs Property of the Rule in VS2010.Basically, I add a custom property name OutputSubDir (String) and I want to use it in the Outputs property like this :...
14 Jan 2016 by Member 23622
I experienced a similar problem. Where the output it was using was the default value for the rule. And Visual Studio would recompile the file every time because it was checking the wrong file for changes.I have something like this in my .targets file (that was auto-generated from a VS...
22 Apr 2015 by Southmountain
let's say I have a windows application project in C#, source files are thisfile.cs,thatfile.cs,plus.cs. thatfile.cs needs to be compiled before thisfile.cs is compiled. inside MSBuild file such as .csproj, how the build order of C# source files are decided? more specifically, how CSC task in...
22 Apr 2015 by Joan Magnet
Is there more than one project?If yes, compiler uses project's references to decide wich project must be compiled first, second, and so on.If there is only one project, order doesn't matter.
22 Apr 2015 by Sergey Alexandrovich Kryukov
MSBuild project file standard offers you a declarative language used to formulate build rules, not imperative.That said, there is no any predefined order of build steps, but you can created this order if you specify dependencies between targets, even if those dependencies are fake. The...
17 Oct 2019 by Member 14626393
I want two .net projects to be built separately using one solution file in Jenkins. If I complile them I want the packages to be dropped separately in each project Kindly help on this -.net14.0 _msbuild - execute the build using Windows command in jenkins What I have tried: I have tried to...
17 Oct 2019 by RickZeeland
You probably need to Install the MSBuild Plugin for Jenkins, read article here: hci-cd-using-jenkins-and-dotnet[^] Also see: .NET Application Continuous Integration ( CI ) using Jenkins[^] You might also consider using TeamCity which is considered as better suited for .NET solutions, read...
25 May 2012 by Vishant79
Hi Friends,I am trying to MSBuild a Web application programitically.I am able execute it from command line successfully and get the build.Please help me in getting the same done programitically.Thanks,Vishant
25 May 2012 by Manas Bhardwaj
I would recommend stronlgy to go the official route via classes/interfaces in Microsoft.Build namespace. Esp. the class Microsoft.Build.Execution.BuildManager and the Singleton Microsoft.Build.Execution.BuildManager.DefaultBuildManager is what you are after to run a build task... source code...
9 Jul 2020 by CodingCoyote
Tutorial using the Build Task NuGet Package Template with GitHub or `dotnet new`
30 Sep 2011 by skumarn
HI, Please tell me steps to create a msbuild script to perform build automation with performing unit test on windows application
30 Sep 2011 by RaisKazi
Have a look at below link.http://confluence.public.thoughtworks.org/display/CCNET/Using+CruiseControl.NET+with+MSBuild
5 Nov 2020 by jflarvoire
I'm trying to setup a Jenkins build system, to automate the build and test of our project when a developer pushes code into our internal github server. The build system is a Windows Server Core with Jenkins and MSBuild. This works fine for a...
24 May 2018 by Member 11635133
Hi, I'm creating MSbuild script to build our project and wanted to pass parameter from Jenkins to MSbuild. I have configured parameter value in Jenkins and I need to get that parameter in MSbuild script. Can any one please guide me what is the command to get parameter from Jenkins? What I...
2 Oct 2011 by skumarn
Hi,Please tell me steps that are needed to run unit test on c# or asp.net project automatically using msbuild with cruisecontrol.net
10 Oct 2011 by skumarn
Hi,While i am running Mymath , a c# application using NCover as shown below:C:\Program Files\NCover>ncover.console D:\Mymath\Mymath\bin\Debug\Mymath.exeI got below output:NCover is unable to write a file to 'C:\Program Files\NCover\coverage.nccov'because it it running without...
10 Oct 2011 by koolprasad2003
before opening your command prompt do the following things1. Start --> All Programs --> Accessories --> right click command prompt click on Run as.. and select administratorand then run your command
10 Oct 2011 by Mehdi Gholam
Use the following command line :C:\>ncover.console.exe //x "c:\coverage.nccov" D:\Mymath\Mymath\bin\Debug\Mymath.exe
14 Mar 2017 by skumarn
Hi,Here is my Test.proj file code. xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> "C:\Program Files\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/> ...
14 Mar 2017 by OriginalGriff
Um. That doesn't look right at all: xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> Has a tag close ">" on the first line, and on the second.So does the next bit: "C:\Program...
3 Oct 2011 by skumarn
Hi,I got below error while performing build automation using NUnit, msbuild with CruiseControl.NET error MSB6004: The specified task executable location "C:\Program Files\NUnit 2.5.10\bin\nunit-console.exe" is invalid.Please tell me how to resolve this error.
3 Oct 2011 by RaisKazi
Have you configured path of "nunit-console.exe" correctly in CruiseControl configuration file.Here is more information on this - Click Here
3 Oct 2011 by Manfred Rudolf Bihy
Would you care to tell us which part of the message you are having problems with? It should be obvious that the configuration tells NUnit that there is an executable at location "C:\Program Files\NUnit 2.5.10\bin\nunit-console.exe". Did you check if this file exists at that location?Please...
9 Oct 2011 by skumarn
Hi,I had created an automated build script to test unit test cases those were created by NUnit using CruiseControl.net.I had created one msbuild script as shown below: xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> "C:\Program...
9 Oct 2011 by Mehdi Gholam
Edit the following line (removed testcontainer:) :D:\Mymath\MyMathTest2\bin\Debug\MyMathTest2.dll
30 Sep 2011 by skumarn
Hi, Please tell me steps for how to use NUnit to perform unit test on windows application using msbuild with cruisecontrol.net
30 Sep 2011 by Mehdi Gholam
CruiseControl has excellent documentation and samples on this subject : Integrating NUnit into your build in the CruiseControl.NET Server
14 Oct 2011 by skumarn
Hi,Please tell me steps for how to use sandcastle with cruisecontrol.net for c# application
14 Oct 2011 by Simon Bang Terkildsen
try google will ya, I just entered your question title into google[^] and see the results Using Sandcastle with CruiseControl.NET[^]Automatically generate SandCastle documentation using CruiseControl.NET or VSTS Team Build[^]CruiseControl.NET and Sandcastle Help File...
6 Jun 2013 by Angshuman1977
I have a website project in my .NET 4.0 solution. It has a reference to a 64 Bit dll. I am able to build / compile it from the command prompt. However, the build from Visual Studio fails with a bad image format exception, since Visual Studio by default uses the 32 Bit version of the compiler...
6 Jun 2013 by Stephen Hewison
Yes. In your project properties there is a platform setting which can be set to 32bit, 64bit or Any. You should be able to set this to force 64bit compilation.How to: Configure Projects to Target Platforms[^]
26 Jul 2016 by vishalpankaj21
i want to create a windows form application in asp.net which will build the solution or projects pro-grammatically using ms-build .please provide me source code and give some idea What I have tried:i want to know i have to generate project file dynamically or directly i can create...
26 Jul 2016 by Richard MacCutchan
First you will need to install all the msbuild and .NET programs (compilers, resource generators, linkers etc.) required to create a forms application. You will then need some way of capturing source code in your ASP.NET web pages, saving it to some location on the server, generating the msbuild...
23 Dec 2012 by Md. Rashim Uddin
When i tried to create a virtual directory in the remote server using Nant build script It could not create and shows the error msg below,"The webservice at 'remote_machine' does not exist or is not reachable"The OS of remote server is Windows server 2008. Here i have used nant 0.92 and...
19 May 2014 by wliao
Integrating list of custom types into the TFS build template
24 Mar 2017 by LiamD
Hi,Projects can be built by different versions of msbuild e.g. C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe C:\Windows\Microsoft.Net\Framework\v2.0.50727\MSBuild.exeIs there any way to determine (e.g....
24 Mar 2017 by Dave Kreskowiak
There is no way to determine which version of MSBuild was used. There is no days in the executable that says which version was used and nothing in them specific to MSBuild to use as a trail of breadcrumbs to determine it either.You dont even need MSBuild to build an executable.
3 Feb 2022 by DoingWork
Like in windows OS, AppInstaller.msi file, What is required installer extention for Linux/Ubuntu What I have tried: What tool will be suitable for build made by VSCode in linux ? I have made AppImage file it is not installer file, so...
3 Feb 2022 by Chris Copeland
The most popular is likely to be the .deb package format[^] which I believe is used in apt-get installations, and can also be installed manually over dpkg. Ideally you need a Linux environment to build the package, though on Windows you can...
23 May 2011 by Chasxu
Hi, I am building a 64 bit application. When I build the "projectA", there is an error:C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3341,9): error MSB3097: File "C:\path\to\bin\projectA.dll" is not a valid assembly.Does anyone know what the problem...
23 May 2011 by Dave Kreskowiak
If your project is 64 bit and the .DLL you're trying to use is 32-bit it won't work and could come up with that error. You cannot combine 64- and 32-bit code in the same project or process.
20 Aug 2014 by Krishna Siva
I am writing MSbuild scripts to automate my build process without using visual studio for building my application. Recently stuck up with this error " $(projectpath)\.nuget\nuget.targets(93,9): error : Package restore is disabled by default. To give consent, open the Visual Studio...
21 Aug 2014 by Krishna Siva
Sorry, Use the first try option and run your vs command prompt as an admin. I have fixed it myself.
20 Sep 2017 by Member 9288201
I've tried several different commands and versions of MSBuild but I still can't generate a Web deploy package from it. I can, however, create one via Visual Studio 2017 using the same solution and pubxml file. What I have tried: I must be missing something in command line but I don't know...
1 Mar 2024 by Matt Bond
You need a DeployTarget. See Building and Packaging Web Application Projects
8 May 2012 by sujanir
Hi, The problem I face is my target 'CopyBuildFiles' does not copy as I think it is unable to find the build folder. The build folder is defined in the property $(BuildFolder), this folder name is created based on date.time and is created in one of the previous targets that runs before...
8 May 2012 by Sergey Alexandrovich Kryukov
Sorry if my post does not help you as you expect.I just don't think I have enough patience to find a "lost" folder for your. I used to do way more sophisticated master projects with special targets, but this is possible when you have everything in your hands and can debug the process (which...
14 May 2012 by sujanir
For those facing similar issues, if you are after a real solution, read on...MSBuild expects the property defined by itemgroup to be present inside of the target. Replacing ItemGroup tag with Createitem tag helped me to arrive at a solution. Put this in a separate target and call the target...
23 Jul 2020 by VD-Flash
Hello readers. I am trying to run MSBuild through command line but it keeps giving me the same error. It says it cannot run Visual C++ component VCBuild.exe. Any solutions to this problem ? Thank you for reading. What I have tried: I've...
23 Jul 2020 by Richard MacCutchan
See node.js - How do I add VCBuild.exe to Windows 10 w/o Visual Studio - Super User[^].
23 Jul 2020 by Shao Voon Wong
You can download the command line VC++ tools here. Microsoft C++ Build Tools without Visual Studio[^]
10 Sep 2020 by Member 13187373
I am working on Winforms projects. I am facing a build issue (in release mode) on Jenkins server which is running on a remote machine. Below is the error on Jenkins log: "D:\Nightly\DataStore.NET\Client\mainline\DataStoreClient.sln" (Rebuild...
9 Sep 2020 by Richard MacCutchan
Getting error MSB3073[^]. Looking at the error messages your path backslash characters are getting removed from the paths.
28 Sep 2023 by Sergey Alexandrovich Kryukov
MSBuild is a flexible tool, it can be used not only for Microsoft toolchains, and it can even be used for non-programming chores
30 Jun 2017 by Arun Vasu
I have a situation to build multiple solution using MSBUILD in multi threading, but during build, always few solution get failed. I have try to build each solution one by one , its working perfectly. but i have try to build 5 solution using multi threading, few build get failed. As I...
30 Jun 2017 by RickZeeland
In failed.txt I can see that MsBuild has problems finding CopyArray_Test and searches in lot of places until it finds one that you probably did not intend. So make sure you have got your paths right, and maybe doing a Rebuild will help too.
14 Jul 2014 by MarkPearlCoZa
MsBuild notes
13 Apr 2016 by Denis Kuzmin (reg)
Explanation and architecture of powerful plugins system to MSBuild for flexible service of any projects and libraries, the build processes and processes at runtime.
14 Jun 2012 by Henning Dieterichs
Hello!Curr...
1 Jul 2012 by Henning Dieterichs
I've asked the question here[^] and get the solution: Now,...
5 Jan 2013 by Sebastian Solnica
MSBuild: MSB3275 Warning, GAC and .NET Version
16 Oct 2012 by Sunasara Imdadhusen
MS Test Result Viewer is a free open source library to convert MS Test result (.trx) file into HTML. It is also allowed you to perform MS Test on your test container project (.dll) file. This utility will work with simple command line arguments to generate test report in HTML format with excellent U
26 May 2014 by vishalbisa
I have a small issue in a nant build file.Brief : we have a 2 build files EX (web and DB) which are independent and called seqentially..nant -buildfile:web.buildnant - buildfile:db.buildTo save time we are building it in parallel by adding a bat file and inside bat file we call...
8 Apr 2021 by Member 14859151
Currently in our company we are executing tests from CCNet (in Automation VM) by specifying different build arguments, however I feel it is now best to migrate to better automation server which is Jenkins I am new to Jenkins world however I...
30 May 2011 by Beavis Killer
Details on how to use OneClick publishing in VS2010 to build and publish across domains using FTP or FTP with SSL.