locked
Improved Project Templates RRS feed

  • General discussion

  • I've built written a pair of new project templates for making WHS add-ins which are available here:

    In order to use them, you'll need to do the following:

     

    1. Copy desired version to the following directory:

     

    Vista:

    %UserProfile%\Documents\Visual Studio 2005\Templates\ProjectTemplates\<Language>\

     

    XP/2003:

    %UserProfile%\My Documents\Visual Studio 2005\Templates\ProjectTemplates\<Language>\

     

    Where <Language> is either Visual C# or Visual Basic.

     

    Once installed, they will be visible and usable under the My Templates section of the New Project dialog.

     

    2. Add reference to HomeServerExt.dll (if you don't have your development environment properly rigged)

     

    3. Change assembly name:

     

    As easy as it is to make an add-in with these templates, a bug exists in Visual Studio 2005 and 2008 which allows the dynamic naming of the namespace based on the project name you specify... however the assembly name is always set to the project name, something that isn't always desired.

     

    You'll need to manually change your assembly name (until the 2005/2008 bugs are fixed, in which case the templates should then automatically work) to match the following criteria:

     

    Namespace:

    Microsoft.HomeServer.HomeServerConsoleTab.YourTabName

     

    Assembly Name:
    HomeServerConsoleTab.YourTabName

     

    Where YourTabName is the unique name you've given to your tab.

     

    What's so special about these templates? They give you the following advantages over doing it yourself and/or the previous versions:

    • Dynamically generated settings guid
    • Dynamically generated root namespace name based on template name
    • Dynamically generated namespace name in code files
    • Pre-built user controls for layout

    More details on my blog.

    Monday, November 12, 2007 3:56 PM
    Moderator