Visual Studio 2013 Integration - Example Project
|how-to | home|
You may wish to read the introduction before reading this section.
The Manifest Maker installation includes an example Visual Studio 2013 solution illustrating the use of manifest projects in the Visual Studio 2013 environment. This is a quite elaborate solution intended to illustrate as much as possible. Chances are that real-life needs are less complex then this. The solution contains the following projects:
This is a .Net class library. This project builds a CLR manifest for this DLL and later uses it in the manifest for the program (cmdEXE).
Since .Net projects do not follow the Visual Studio 2013 standard XAML/MSBuild configuration, this project uses the C# build Post Build event. The Post Build event is easy to use but one of the disadvantages is that it cannot use the automatic detection of the folder in which Manifest Maker is installed and, consequently, requires that Manifest Maker folder be in the path or the folder be hard-coded in this definition.
The post-build event is defined as:
This is a simple COM object. This project also contains a Manifest Maker project file (comDLL.sxs32mm). This project illustrates building two manifests for a COM DLL: the REF-manifest using the Manifest Maker project and the COM manifest built from COM information extracted from the DLL. To build both manifests this project includes both Manifest maker build customizations as illustrated in the introduction. The actual contents of the comDLL.sxs32mm project file is just an illustration intended to be reproducible on a wide range of computers so it is using component likely to be on any Windows machine.
This is a plain Windows DLL. The project contains a Manifest Maker project file (winDLL.sxs32mm) which is used to build the manifest. This project only needs the sxs32vs10 build customization but there is no harm in including both because the COM customization defaults to Build type: none and will do nothing during the DLL build. Like in the COM project above the actual contents of the comDLL.sxs32mm project file is just an illustration intended to be reproducible on a wide range of computers so it is using component likely to be on any Windows machine.
This is a command line Windows program. The corresponding cmdEXE.sxs32mm Manifest Maker project contains references to all three DLLs created in this solution. This program will have a #1 manifest embedded in it. The manifest references the assembly consisting of comDLL.dll and its embedded manifest, the unmanaged assembly consisting of the clrDLL.dll and the corresponding unmanaged CLR manifest embedded in it as the #1 resource and the winDLL.dll which is referenced by name since it has no DEF-manifest and therefore does not constitute an unmanaged assembly.
Since the cmdEXE project uses the other projects as dependencies, it is defined in Visual Studio as dependent on the other projects. When you build the solution the DLLs and the corresponding assemblies are built first and the program is built only after the two other builds are complete.
The easiest way to create *.sxs32mm project file for integrated build is to use Manifest Maker GUI. Project files are well-formed XML and it is possible to create the project files programmatically. Use a project file saved from Manifest Maker as a template. While we cannot possibly support all variations of project files that may be generated, we will do our best to help you, if you have a problem.
Integrated build ignores or overrides many of the Manifest Maker's project settings. It is possible that some overrides may create conflicts. While these can easily be resolved by editing the project, it is more convenient to use the Save for Integration option in the Manifest Maker File menu. This option saves a copy of the current project with the minimum information required for an integrated build. It may be a good idea to save the original Manifest Maker project file to make it easier to make changes to it in the future.
Read more about the above manifests in Visual Studio 2013 Integration - Manifests in the Example Project
Continue to Visual Studio 2013 Integration - COM Project Properties.
Continue to Visual Studio 2013 Integration - Manifest Project Properties.