views:

696

answers:

3

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."

+6  A: 

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.

Anton Tykhyy
Yes - but that's not an option in the list when you "Create Project" inside Visual Studio.
nzpcmad
Because VS doesn't need one. All its projects are 'Makefile' projects in a sense, the difference being that it uses msbuild instead of make.
Anton Tykhyy
I'm not talking about "make". I'm talking about a "Makefile project". Inside VS, if you select C++, a Makefile project is one of the options. Inside VS, if you select C#, there is no such option. Or to put it another way, can you create a MSbuild project type for C#?
nzpcmad
Continued: I'm asking this because a Makefile project is the way to run MSIL code (*.il) files inside VS. I don't want anything else in the project - just the .il files and the batch command (ilasm /debug) to build them.
nzpcmad
You'll have to write your msbuild project by hand. Once it works with command-line msbuild, I think you can just add it to your solution, manually or give it a standard extension like .csproj.
Anton Tykhyy
+2  A: 

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.

Roger Lipscombe
+1  A: 

Msbuild is what is used to build your projects when you hit the Play button. Personally I like NAnt + NantContrib it was easier for me to pick up and start using right away. For all new projects I use tree surgeon this tool creates a default build script and proper build tree with testing project and code coverage report.

Aaron