CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_studio_2005 Tags:
Item Type: NewsGroup Date Entered: 1/29/2006 4:40:38 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 13 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
DarkoMartinovic
Asp.Net User
Project templates1/29/2006 4:40:38 PM

0/0

Hi,

Is there any link or sample which explains how to extend project templates using iwizard interface?

Thanks in advance

Darko

timmcb
Asp.Net User
Re: Project templates1/30/2006 11:03:26 PM

0/0

There are some docs and sample code here:

http://msdn2.microsoft.com/en-us/library/ms185301.aspx

I wrote one recently:  Here was my code:

/////////////////////////////////////////////////////////////////////////
<VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
  <TemplateData>
    <Name Package="{39c9c826-8ef8-4079-8c95-428f5b1c323f}" ID="3062"/>
    <Description Package="{39c9c826-8ef8-4079-8c95-428f5b1c323f}" ID="3063"/>
    <Icon Package="{39c9c826-8ef8-4079-8c95-428f5b1c323f}" ID="4533"/>
    <TemplateID>WebForm</TemplateID>
    <TemplateGroupID>Web</TemplateGroupID>
    <ProjectType>CSharp</ProjectType>
    <ProjectSubType>Web</ProjectSubType>
    <ShowByDefault>false</ShowByDefault>
    <SortOrder>1</SortOrder>
    <DefaultName>WebForm.aspx</DefaultName>
  </TemplateData>
  <TemplateContent>
    <References>
      <Reference>
        <Assembly>System.Web</Assembly>
      </Reference>
      <Reference>
        <Assembly>System</Assembly>
      </Reference>
      <Reference>
        <Assembly>System.Data</Assembly>
      </Reference>
      <Reference>
        <Assembly>System.Drawing</Assembly>
      </Reference>     
      <Reference>
        <Assembly>System.Xml</Assembly>
      </Reference>     
    </References>
    <CustomParameters>
      <CustomParameter Name="$ParentExtension$" Value=".aspx"/>
      <CustomParameter Name="$ChildExtension$" Value=".cs"/>
    </CustomParameters>
    <ProjectItem ReplaceParameters="true" TargetFileName="$fileinputname$.$fileinputextension$">Default.aspx</ProjectItem>
    <ProjectItem ReplaceParameters="true" TargetFileName="$fileinputname$.$fileinputextension$.cs" SubType="ASPXCodeBehind">Default.aspx.cs</ProjectItem>
    <ProjectItem ReplaceParameters="true" TargetFileName="$fileinputname$.$fileinputextension$.designer.cs">Default.aspx.designer.cs</ProjectItem>
  </TemplateContent>
  <WizardExtension>
    <Assembly>Microsoft.VisualStudio.Web.Application, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</Assembly>
    <FullClassName>Microsoft.VisualStudio.Web.Application.WATemplateWizard</FullClassName>
  </WizardExtension>
</VSTemplate>
/////////////////////////////////////////////////////////////////////////////////////
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.TemplateWizard;
using System;
using System.Collections.Generic;
using System.Globalization;

namespace Microsoft.VisualStudio.Web.Application
{
    public class WATemplateWizard : IWizard
    {
        string _parentExtension;
        string _childExtension;
        EnvDTE.ProjectItem _parent;
        List<EnvDTE.ProjectItem> _children;

        void IWizard.BeforeOpeningFile(EnvDTE.ProjectItem projectItem)
        {
        }

        void IWizard.ProjectFinishedGenerating(EnvDTE.Project project)
        {
        }

        void IWizard.ProjectItemFinishedGenerating(EnvDTE.ProjectItem projectItem)
        {
            if (projectItem != null && !string.IsNullOrEmpty(_parentExtension) && !string.IsNullOrEmpty(_childExtension))
            {
                string name = projectItem.Name;
                if (name.EndsWith(_parentExtension, true, CultureInfo.InvariantCulture))
                {
                    _parent = projectItem;
                }
                else if (name.EndsWith(_childExtension, true, CultureInfo.InvariantCulture))
                {
                    if (_parent != null)
                    {
                        MakeChild(_parent, projectItem);
                    }
                    else
                    {
                        if (_children == null)
                        {
                            _children = new List<EnvDTE.ProjectItem>();
                        }
                        if (_children != null)
                        {
                            _children.Add(projectItem);
                        }
                    }
                }
            }
        }

        void IWizard.RunFinished()
        {
            if (_parent != null && _children != null)
            {
                foreach (EnvDTE.ProjectItem child in _children)
                {
                    MakeChild(_parent, child);
                }
            }

            _parentExtension = null;
            _childExtension = null;
            _parent = null;
            if (_children != null)
            {
                _children.Clear();
                _children = null;
            }
        }

        void IWizard.RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams)
        {
            try
            {
                _parentExtension = replacementsDictionary["$ParentExtension$"];
                _childExtension = replacementsDictionary["$ChildExtension$"];
            }
            catch
            {
            }
        }

        bool IWizard.ShouldAddProjectItem(string filePath)
        {
            return true;
        }

        static private void MakeChild(EnvDTE.ProjectItem parent, EnvDTE.ProjectItem child)
        {
            if (parent != null && child != null)
            {
                string file = child.get_FileNames(1);
                if (!string.IsNullOrEmpty(file))
                {
                    parent.ProjectItems.AddFromFileCopy(file);
                }
            }
        }
    }
/////////////////////////////////////////////////////////////
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.Shell.Design.Serialization;
using System;
using System.Diagnostics;
using System.IO;
using System.Collections;
using System.Runtime.InteropServices;
using System.Web;

namespace Microsoft.VisualStudio.Web.Application
{
    [...]
    [ProvideObject(typeof(WATemplateWizard))]
    internal class WAPackage : Package
    {
        ...
    }
}
//////////////////////////////////////////////////////////////


Tim McBride

This posting is provided "AS IS" with no warranties, and confers no rights.
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Complete Idiot's Guide to Project Management with Microsoftproject 2003 Authors: Ron Black, Pages: 384, Published: 2005
Managing Projects with Microsoft Project 2000: For Windows Authors: Gwen Lowery, Teresa S. Stover, Pages: 464, Published: 2001
Special Edition Using WordPerfect Office X3 Authors: Laura Acklen, Read Gilgen, Pages: 979, Published: 2006
Microsoft Office Project 2003 Bible Authors: Elaine J. Marmel, Pages: 960, Published: 2003
Absolute Beginner's Guide to Wordperfect X3 Authors: Laura Acklen, Pages: 369, Published: 2006
Project Management for the 21st Century Authors: Bennet P. Lientz, Kathryn P. Rea, Pages: 395, Published: 2002
Microsoft Office Project 2007 For Dummies Authors: Nancy Muir, Pages: 388, Published: 2006
Microsoft Office Project Server 2007: The Complete Reference Authors: Dave Gochberg, Rob Stewart, Pages: 647, Published: 2008
Microsoft Project 2007: The Missing Manual Authors: Bonnie Biafore, Pages: 682, Published: 2007
Special Edition Using Microsoft Project 2002 Authors: Tim Pyron, Pages: 1224, Published: 2002

Web:
tools: Project Management checklists and templates A collection of project management documents and templates, including initiating checklists, risk assessments and project status reports.
ProjectConnections.com - Project Management Templates Real-world downloadable project templates from people in the trenches. Project management forms, checklists, worksheets, and guidelines with tips on how, ...
Project Home Page - Microsoft Office Online Project 2007 Demos. » Project 2003 Demos. Templates. » Project Templates. Related Products and Technologies. » Enterprise Project Management Solution ...
Updated FlashDevelop Project Templates | BIT-101 Blog I’ve been using my FlashDevelop Project templates for a while now, and it’s nice to see that .... Keith Peters’ ANT-based project templates, unzip them to ...
Project Management Templates, Deliverable Documents, and IT ... Project Management Templates and MS Project format plans with deliverable templates for projects like PMO, CRM, RAD, plus proposal documents, Sarbanes- Oxley ...
Project Management Templates, Template Tools & Life Cycle Kit Project management templates and tools for the project management life cycle. Every project management template includes forms and examples.
IT Project Management Tools Templates Workbooks Guides and ... Find IT project management tools and templates for Information Technology operations. Read articles, download management kits, apply policies and procedures ...
Sara Ford's WebLog : Did you know… You can create project ... Oct 16, 2008 ... The project templates you create will be saved in ... Do you have any guidance for creating a project template based on the Web Setup ...
Free Project Management Templates and Successful Project ... Free project management templates and successful project management resources., project management testimonials, Welcome to e-ProjectManagers.com The number ...
Project Management Template The Project Management template for Excel provides a generic, affordable Excel based project management solution for planning and managing a project from ...

Videos:
Project 4: Portfolio: Site Template When you are creating a site consisting of multiple pages, you might want to consider making a template that is used to create each page on the web s...
Method 123's Project Management Templates An overview of how Method 123's project management templates can help you create high quality project documents to save you time and make project man...
After Effects Project Template A template i Made, very easy to edit $50.00 I only sell with paypal Project Info: 1280x720 pixel ratio: 1.00(square pixels) contact me by email at : ...
Enleiten Pro: Projects and Templates For small business project management, or your own personal GTD system, Enleiten can help. Learn how to create new projects and custom project templ...
IT-Dev SharePoint DSL Toolkit for Visual Studio (Part 1/2) http://www.it-dev.pl/en/Components/SharePoint_DSL_ToolKit.aspx IT-Dev SharePoint DSL ToolKit for Visual Studio provides a custom Visual Studio proje...
How to Create a Master Schedule with MS Project www.e-ProjectManagers.com presents a 10 minute video that demonstrates how to create a master project schedule in MS Project.
After Effects Templates - Flying Pictures Project based templates for Adobe After Effects Easy to use and very impressive effects! Try it! Downloadable projects at: http://www.professional-vi...
T-Dev SharePoint DSL Toolkit for Visual Studio Video 2 http://www.it-dev.pl/en/Components/SharePoint_DSL_ToolKit.aspx IT-Dev SharePoint DSL ToolKit for Visual Studio provides a custom Visual Studio proje...
PowerPoint: Templates and Wizards Episode 4 (of an 18-part series). This Nortel LearniT tutorial reviews the process for using the various templates and wizards available in PowerPoin...
IT-Dev SharePoint DSL Toolkit for Visual Studio (Part 2/2) http://www.it-dev.pl/en/Components/SharePoint_DSL_ToolKit.aspx IT-Dev SharePoint DSL ToolKit for Visual Studio provides a custom Visual Studio proje...




Search This Site:










looking for a quick method to develop good looking prof. web apps.

i need suggestions for debugging some strange behavior.

silverlight 1.1 in vs.net 2008?

add new item to scheduler

.css formatting...

using javascript and styles in designer

changepassword control and raising the changepassworderror

hosting and log files

email notification module

menu control and xmldocument

unable to load past project, visual studio 2005

resx files, necessity, deployment, management, and so on

anyone have megicredirect actuallly working on their site?

how to get current user ad information

external link with staticsitemapprovider

domain name "localhost/dotnetnuke" does not exist in the database

applying master pages through a config file and xhtml 1.0 transitional validation

treeview control with dhtml and javascript

cant access the server file system

web.config change membership parameters

passing login info to dotnetnuke's url

record a link click

need help

giving rights according to groups

microsoft enterprise library problem.

failed to map the path /appname/asp_globalresources

where is the spellchecker?

encrypting connection string

scroll bar doesn't show up in design view?

visual studio 2005 express and sql server 2005 express

 
All Times Are GMT