Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Visual Studio C# equivalent of the Visual Studio C++ Makefile project

In Visual C++ inside Visual Studio, one of the project subtypes is a "Makefile Project".

But there doesn't seem to be an equivalent for Visual C# inside Visual Studio?


BTW, a Makefile project is:

If you have a project that you build from the command line with a makefile, then the Visual Studio development environment will not recognize your project. To open and build your project using Visual Studio, first create an empty project containing the appropriate build settings using the Makefile Project Wizard. You can then use this project to build your project from the Visual Studio development environment.

The project displays no files in Solution Explorer. The project specifies the build settings, which are reflected in the project's property page.

like image 734
rbrayb Avatar asked Dec 30 '22 03:12

rbrayb


2 Answers

The equivalent of make in Visual Studio world is msbuild. Visual Studio does not use make. .csproj, .vbproj etc. are input files for msbuild. You can do pretty much the same stuff in them as in conventional makefiles, including command line building, custom targets etc.

like image 200
Anton Tykhyy Avatar answered May 16 '23 06:05

Anton Tykhyy


There's nothing C++-specific about the Makefile project type; it just runs a command line. It's just that it's listed along with the Visual C++ project types. You can add one to a solution that otherwise contains nothing but C# projects.

Alternatively, you could set up a pre-build step in your C# project that directly runs nmake, msbuild or even NAnt.

like image 35
Roger Lipscombe Avatar answered May 16 '23 06:05

Roger Lipscombe