locked
How to get modified project template dynamically through choosing specific option form wizard. RRS feed

  • Question

  • I have created one custom template which was placed in the following location.

    C:\Users\sivakumard\Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual C#\ Template.Zip

    This template will be loaded in VS2010  while creating the new project. After choosing the template,one custom wizard will be displayed.Please check below screenshot

    When "Ok" button is clicked in the wizard, i will perform some actions using wizard concept in project template .Please check below details

    1.Loading the web.config file from  the location C:\Users\sivakumard\Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual C#\ Template.Zip and remove the some assemblies,handlers in that file.

    2.Saved the modified web.config file in the same location.

    3.After that, i need to load the  modified project template  but instead of that  old project was loading ( i.e modified web.config file is not reflected

    4.when performing the action in second time it will loads the modified project template correctly.

    so i want to know how to write a code for refreshing the vs-template  to get the modified project in the following location..

    C:\Users\sivakumard\Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual C#\ Template.Zip

    Please help me..

    Thanks,

    Siva


    siva

    Monday, March 26, 2012 6:09 AM

Answers

  • Hi siva,

    I temporary make my last reply as answer. You can unmark it if they provide no help.

    Thank you for your understanding!


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Siva Rajini Monday, April 2, 2012 6:28 AM
    Monday, April 2, 2012 6:25 AM

All replies

  •  

    I have created one custom template which was placed in the following location.

    C:\Users\sivakumard\Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual C#\ Template.Zip

    This template will be loaded in VS2010  while creating the new project. After choosing the template,one custom wizard will be displayed.

    1.Choosing specific option from the wizard then i will modify the web.config file in that template based on the option chosen.

    2.Modified web.config file saved in the same template location. (Replacement)

    3.after that ,i want to load the project which is resided in modified template but instead of that old project template was loading..  

    so i want to refresh the project template using DTE.ExecuteCommand in C#.  that is i want to load the modified project template during specific option chosen through wizard. Please help me how to refresh the project template to get the modified content using Excutecommand.    

    Thanks,  

    Siva


    siva

    • Merged by lucy-liu Wednesday, March 28, 2012 8:03 AM related issue
    Monday, March 26, 2012 7:21 AM
  • Hi siva,
    Based on my knowledge , we cannot dynamically to load a modified project template.
    According to your description, the dynamically modified is your web.config file,  so I think you can try to use the DTE to read the modified web.config file after generating the project template.

    If you still have any further concern abou this issue, please feel free to let us know, we will try our best to help solve this issue.


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by lucy-liu Monday, April 2, 2012 6:25 AM
    • Unmarked as answer by Siva Rajini Monday, April 2, 2012 6:27 AM
    Wednesday, March 28, 2012 8:11 AM
  • Hi siva,

    I temporary make my last reply as answer. You can unmark it if they provide no help.

    Thank you for your understanding!


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Siva Rajini Monday, April 2, 2012 6:28 AM
    Monday, April 2, 2012 6:25 AM
  • Hi lucy,

    Thanks for your update.

    I have found the solution by myself instead of using DTE command to modify the web.config file. I need one more help regarding wizard in project template.

    I have created the Wizard but i don't want to install this wizard DLL into GAC. i have tried the below link and its working fine..

    http://stackoverflow.com/questions/8299718/use-local-iwizard-assembly-as-wizardextension-in-project-template

    but my requirement is different i want to place My wizard DLL separately in the following location..

    C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Wizard DLL

    In the Extension folder, i want to place the DLL in another folder. how can i do it?

    if i place the DLL in the  location C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ means its working fine .instead of placing the DLL in to GAC.

    please suggest any solution?

    Thanks,

    Siva


    siva

    Monday, April 2, 2012 6:37 AM