Visual C# Developer Center > Visual C# Forums > Visual C# IDE > Question on where to uninstall Code Snippet?
Ask a questionAsk a question
 

AnswerQuestion on where to uninstall Code Snippet?

  • Tuesday, March 13, 2007 9:29 AMFocus Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hello,

     

    I have a question on Code Snippets.

     

    I installed a snippet by this way:

    1.Put a folder in C:\TestSnippet with snippet files

    2.In the registry I add a new key under HKLM\Software\Microsoft\VisualStudio\8.0\Languages\CodeExpansions\CSharp\Paths call mySnippet with value ‘C:\TestSnippet’

     

    Then in  the Code  Snippet Manger there will be a snippet item called TestSnippet .

     

    However when I remove this key in the registry and the folder with files.

     

    In the code window, when I right click Insert Snippet… , the TestSnippet is still there but it does’t work because there is no snippet files.

     

    I want to know that if there is a file or something that buffer the snippet.

     

    By the way , I know that we can use Remove in the Snippet Manager to remove the snippet you want.

    But because I add the snippets during the installation(setup not vsi file), and I want to uninstall the snippet by the uninstallation.

     

    Is there any command line for this uninstallation?

    or is there any arguments for devenv on this?

     

    Do me a favor.

    Thanks.

Answers

  • Tuesday, March 13, 2007 2:50 PMJose Escrich Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    There is a known issue about that, you should also remove the snippet from the Expansions.xml file, if you're using XP, you will find that file here:

    c:\documents and settings\[YOUR USER]\Local Settings\Application Data\Microsoft\VisualStudio\8.0\1033

    although if you're running on vista, you will find it here:
    C:\Users\[YOUR USER]\AppData\Local\Microsoft\VisualStudio\8.0\1033

    Jose
    Hope it helps

All Replies

  • Tuesday, March 13, 2007 9:45 AMKane- Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    C:\Install_Location\Microsoft Visual Studio 8\VC#\Snippets\1033\Visual C#

    It would have probably created a .snipped file and placed it in there with the rest.
  • Tuesday, March 13, 2007 9:50 AMFocus Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Sorry to tell you that there is no snippet file in that folder.

    My problem is I cannot find my Snippet in Snippet Manager.

    but it exist in the right click menu items although it didn't work because I remove the files when I do uninstallation.

     

  • Tuesday, March 13, 2007 9:57 AMFocus Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    here is my msn:marian_winny@hotmail.com

    he/she who can help me, please keep in touch  with me.

    Thanks!

  • Tuesday, March 13, 2007 12:46 PMTomas Fröjdö Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     Kane- wrote:
    C:\Install_Location\Microsoft Visual Studio 8\VC#\Snippets\1033\Visual C#

    It would have probably created a .snipped file and placed it in there with the rest.

    In the future, be sure to place your snippets in the directory mentioned above. You can also create your own subdirectories.

  • Tuesday, March 13, 2007 2:50 PMJose Escrich Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    There is a known issue about that, you should also remove the snippet from the Expansions.xml file, if you're using XP, you will find that file here:

    c:\documents and settings\[YOUR USER]\Local Settings\Application Data\Microsoft\VisualStudio\8.0\1033

    although if you're running on vista, you will find it here:
    C:\Users\[YOUR USER]\AppData\Local\Microsoft\VisualStudio\8.0\1033

    Jose
    Hope it helps
  • Wednesday, March 14, 2007 12:52 AMFocus Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Thanks,Jose.