Understanding MM .NET Project Templates
MM .NET Project Template Zip Files
With MM .NET installed on your machine, when you select to create a new project in Visual Studio, the New Project dialog lists both MM .NET Visual C# Projects and MM .NET Visual Basic Projects. If you select one of these languages, it displays the corresponding project templates in the Templates pane.
Note: If you can't see the MM .NET project templates, check out the Help topic Why can't I see the MM .NET Project and Item Templates?
When you install MM .NET on your computer, project template zip files are installed in the following directory:
%USERPROFILE%\Documents\Visual Studio 2026\Templates\ProjectTemplates\OakLeafVisual Studio Project Template Files
Visual Studio project .vstemplate files contain information that instructs Visual Studio how to display a project template in the New Project dialog and what actions to perform when a new project is created.For example, here is the contents of the MM .NET EF Business Object project MyTemplate.vstemplate file:
<?xml version="1.0" encoding="utf-8"?>
<VSTemplate Version="3.0.0" Type="Project" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
<TemplateData>
<Name>MM .NET EF Business Object Library</Name>
<Description>A project template for creating an MM .NET Entity Framework business object library.</Description>
<ProjectType>CSharp</ProjectType>
<ProjectSubType>
</ProjectSubType>
<SortOrder>1</SortOrder>
<CreateNewFolder>true</CreateNewFolder>
<DefaultName>MMEFBusiness</DefaultName>
<ProvideDefaultName>true</ProvideDefaultName>
<LocationField>Enabled</LocationField>
<EnableLocationBrowseButton>true</EnableLocationBrowseButton>
<Icon Package="{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}" ID="4547" />
</TemplateData>
<TemplateContent>
<Project TargetFileName="MM .NET EF Business Object Library.csproj" File="MM .NET EF Business Object Library.csproj" ReplaceParameters="true">
<ProjectItem ReplaceParameters="true" TargetFileName="AAppTest.cs">AAppTest.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="ABusinessEntity.cs">ABusinessEntity.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="ABusinessObject.cs">ABusinessObject.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="ABusinessRule.cs">ABusinessRule.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="app.config">app.config</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="ClassDiagram1.cd">ClassDiagram1.cd</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="EntityDataModel.edmx">EntityDataModel.edmx</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="EntityDataModel.Designer.cs">EntityDataModel.Designer.cs</ProjectItem>
<ProjectItem ReplaceParameters="false" TargetFileName="EntityDataModel.edmx.diagram">EntityDataModel.edmx.diagram</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="EntityDataModel.tt">EntityDataModel.tt</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="EntityDataModel.cs">EntityDataModel.cs</ProjectItem>
<Folder Name="Properties" TargetFolderName="Properties">
<ProjectItem ReplaceParameters="true" TargetFileName="AssemblyInfo.cs">AssemblyInfo.cs</ProjectItem>
</Folder>
</Project>
</TemplateContent>
<WizardExtension>
<Assembly>OakLeaf.MM2026.Automation, Version=7.0.0.0, Culture=Neutral, PublicKeyToken=94f0661eaef8568c</Assembly>
<FullClassName>OakLeaf.MM.Main.Automation.VisualStudio.mmProjectWizardBase</FullClassName>
</WizardExtension>
<WizardData>
<Settings Language="C#" ProjectType="Business Object Library" ImageName="CSharpLibraryProject.bmp" NuGetPackages="True">
<package id="EntityFramework" version="6.1.3"/>
</Settings>
</WizardData>
</VSTemplate>Specifying Display Information with the <TemplateData> Element
The <TemplateData> element contains information that tells Visual Studio how to display the project template in the New Web Site dialog. Here is a rundown of its most important sub-elements:
| Element | Description |
|---|---|
| Name | The name displayed under the project template icon in the dialog |
| Description | The project description displayed at the bottom of the dialog when the template is selected |
| ProjectType | The type of project (Web) the template is associated with |
| ProjectSubType | The subtype of project (CSharp, VisualBasic, etc.) the template is associated with |
| SortOrder | A relative number that specifies the order in which the project template is displayed in the dialog |
| DefaultName | The default name of a new item created from the template. This is displayed in the Name text box of the dialog |
| Icon | The icon displayed for the project template in the dialog |
Specifying Template Source Code Files with <ProjectItem> Elements
<ProjectItem> elements (nested within the <TemplateContent> element) specify the files that are added to the Web project when it is created. There is one <ProjectItem> element for each file. If an item is stored in a subfolder of the Web project the <ProjectItem> element is nested below a <Folder> element that specifies the subfolder name. For example:<Folder Name="App_Code" TargetFolderName="App_Code">
<ProjectItem ReplaceParameters="true" TargetFileName="App.cs">App.cs</ProjectItem>
<ProjectItem ReplaceParameters="true" TargetFileName="Factory.cs">Factory.cs</ProjectItem>
</Folder>Updating Visual Studio's Project Template Cache
After creating new project templates or changing existing templates, you must update Visual Studio's project template cache. To do this, exit Visual Studio, and launch a Visual Studio Developer Command Prompt (remember to Run as Adminstrator). In the command prompt dialog, enter the following command, then press Enter:DEVENV /SETUP
This command causes Visual Studio to examine the project template folders and add them to its project template cache. This process takes several seconds.
See also:
Understanding MM .NET Item Templates | [_1KG14HFVO]) %>
© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 02/12/26
Comment or report problem with topic
