2

I'm trying to create a project template that works with VS2010 Standard/Pro/Ultimate, as well as Integrated Shell.

I've got the VS2010 Std part working, but for the life of me I can't get it to work w/ Int Shell - probably because my install doesn't have any CSharp projects.

After googling for what seems all day, I stumbled upon IronPython's vstemplate files, which look like this:

<VSTemplate Version="2.0.0" Type="Project" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
  <TemplateData>
    <Name>Python Application</Name>
    <Description>A project for creating a command-line application</Description>
    <Icon>__TemplateIcon.ico</Icon>
    <ProjectType>Python</ProjectType>
    <SortOrder>50</SortOrder>
    <NumberOfParentCategoriesToRollUp>2</NumberOfParentCategoriesToRollUp>
    <CreateNewFolder>false</CreateNewFolder>
    <DefaultName>PythonApplication</DefaultName>
    <ProvideDefaultName>true</ProvideDefaultName>
  </TemplateData>
  <TemplateContent>
    <Project File="PythonApp.pyproj" ReplaceParameters="true">
      <ProjectItem ReplaceParameters="true" OpenInEditor="true" TargetFileName="$safeprojectname$.py">Program.py</ProjectItem>
    </Project>
  </TemplateContent>
</VSTemplate>

These templates work with all versions and have a different ProjectType than the ones mentioned on MSDN: ProjectType = Python. How did they do this? If I use something other than CSharp/Web/VisualBasic, my project type gets sent down the drain.

Thanks;

1 Answer 1

4

I didn't get deep into the problem you are describing but I guess these 2 tips will help you to address the issue. In short you should care about ProjectType property for your custom ProjectNode class, and also ensure you have specified it somewhere in VSX attrubutes and in your custom .template file (I don't remember where I did that exactly). So there are those links I mentioned:

Hope that helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.