Visual C++ .NET and the Managed Extensions
You could create assemblies by hand using Notepad and makefiles, but Visual Studio .NET provides a much more streamlined approach to creating projects using wizards. When you open a new project, Visual Studio presents four templates for generating Managed C++ applications:
Managed C++ Application Generates source code for producing a standalone C++ application with support for Managed Extensions. (For example, the correct command-line switches are flipped on to support Managed C++.) You use this project type for applications that run on the client, such as Windows Forms applications.
Managed C++ Class Library Generates code that supports a C++ DLL using Managed Extensions. Use this option for creating managed components within .NET Framework applications.
Managed C++ Empty Project Generates an empty project with the compiler and linker switches set correctly for supporting Managed C++ Extensions. This is an excellent option for moving existing C++ source files to a managed environment.
Managed C++ Web Service Generates a Managed C++ Web service. (Web services provide programmatic access to a Web site.)
The samples from the SDK provide two additional Managed C++ wizards: one for generating Managed C++ Windows Forms applications and one for generating Managed C++ console applications. Chapter 4 presented a wizard for creating ASP.NET applications using Managed C++.