Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to manually compile a C# project?

Just joined a new project which they are using VC#2008 to build an application. There are several components and many files under one project now. I was asked to setup a build machine to start daily build. The first thing I was told to do is write a batch file to call csc.exe to create an executable manually without the VC#2008 installed.

I am new to C# and I have no idea about the solution. I know the old VC++ can create a makefile for us to do manual build. Does the VC#2008 has similar functionality? Any info and links will be appreciated.

like image 570
5YrsLaterDBA Avatar asked Dec 02 '22 06:12

5YrsLaterDBA


1 Answers

The easiest way to manually build a Visual C# project is to use msbuild. The msbuild executable can be passed the VS project file directly and the result will be identical to VS compiling it.

msbuild myApp.csproj

Msbuild comes as part of the framework and hence can be used without Visual Studio being on the machine.

like image 74
JaredPar Avatar answered Dec 21 '22 13:12

JaredPar