Levi H
Levi H

Reputation: 3586

Visual studio 2010 missing template files (but not in the progam itself)

I'm looking to create a copy of the default class template for VS2010, everywhere I've looked says that the class template should be in:

C:\<Program Files>\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\Code\1033

But it's not in there, the only two files in there are:

AdoNetEntityDataModelT4CodeGenCSharp.zip
AdoNetEntityDataModelT4SelfTrackingCodeGenCSharp.zip

The class templates and others work fine though in VS itself, and none are missing, where could they be?

Upvotes: 0

Views: 191

Answers (1)

dougajmcdonald
dougajmcdonald

Reputation: 20057

If you're on a 64 bit system I'd imagine they would be in Program Files (x86)

I found my VS2012 templates in here:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ItemTemplates\CSharp\Code\1033

Regarding the content, I had two files in there, one .cs and one template file:

Class.cs

using System;
using System.Collections.Generic;
$if$ ($targetframeworkversion$ >= 3.5)using System.Linq;
$endif$using System.Text;
$if$ ($targetframeworkversion$ >= 4.5)using System.Threading.Tasks;
$endif$
namespace $rootnamespace$
{
    class $safeitemrootname$
    {
    }
}

Class.vstemplate

<?xml version="1.0" encoding="utf-8"?>
<VSTemplate Version="3.0.0" Type="Item" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
  <TemplateData>
    <Name Package="{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}" ID="2245" />
    <Description Package="{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}" ID="2262" />
    <Icon Package="{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}" ID="4515" />
    <TemplateID>Microsoft.CSharp.Class</TemplateID>
    <ProjectType>CSharp</ProjectType>
    <SortOrder>90</SortOrder>
    <RequiredFrameworkVersion>2.0</RequiredFrameworkVersion>
    <NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
    <DefaultName>Class.cs</DefaultName>
  </TemplateData>
  <TemplateContent>
        <References>
            <Reference>
                <Assembly>System</Assembly>
            </Reference>
        </References>

    <ProjectItem ReplaceParameters="true">Class.cs</ProjectItem>
  </TemplateContent>
</VSTemplate>

Upvotes: 1

Related Questions