none
Code Snippets are not working in Visual Studio 2015

    Question

  • Hi, I'm trying to use code snippets in Visual Studio in my C# project through IntelliSense. Perhaps when it is not working by pressing Tab Key Twice. So it doesn't work for me to show full code through code snippets...

    Looking for Quick Solution!



    • Edited by Sajid Ali Khan Sunday, November 08, 2015 3:33 PM
    • Moved by Kristin Xie Monday, November 09, 2015 1:56 AM move to better forum
    Sunday, November 08, 2015 3:32 PM

Answers

  • Hi Sajid Ali Khan,

    Could you share us a screen shot about the real issue in your side?

    Like this document here:

    https://msdn.microsoft.com/en-us/library/z4c5cc9b(v=vs.90).aspx

    It is about the code snippets in VS2008, but I use the same steps in VS2015.

    Just create a simple blank C# Console app.

    Ctl+k,Ctrl+X, it would open the Insert Sinppet like the screen shot1.

    Click Up and down keyboard and shortcut, and then click the Tab two times to select the real code snippets, it worked well in my side.

    If it doesn't work, could you share us the detailed steps about how you insert the code snippets in your side? Do you use the same way as the above steps?

    If the same steps don't work in your side, maybe we could think about the VS IDE.

    I suggest you reset your VS settings, and then create a new simple project, test it again.

    https://msdn.microsoft.com/en-us/library/ms247075(v=vs.100).aspx

    But if a simple app worked well, but just your specific app has this issue, to really make sure that it is not related to the project files, please delete .suo file, and then re-open the .xxproj file, clean and build your solution, test it again. Or you could create a new blank solution, and then copy all project files to the new solution, test it again.

    If I misunderstood this issue, please feel free to let me know.

    Sincerely,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Sajid Ali Khan Wednesday, November 11, 2015 11:33 AM
    Tuesday, November 10, 2015 7:09 AM
    Moderator

All replies

  • Hi Sajid Ali Khan,

    Based on your description, your case more related to VS2015, I will move your case to General Visual Studio forum for better support.

    Best regards,

    Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, November 09, 2015 1:56 AM
  • Hi Sajid Ali Khan,

    Could you share us a screen shot about the real issue in your side?

    Like this document here:

    https://msdn.microsoft.com/en-us/library/z4c5cc9b(v=vs.90).aspx

    It is about the code snippets in VS2008, but I use the same steps in VS2015.

    Just create a simple blank C# Console app.

    Ctl+k,Ctrl+X, it would open the Insert Sinppet like the screen shot1.

    Click Up and down keyboard and shortcut, and then click the Tab two times to select the real code snippets, it worked well in my side.

    If it doesn't work, could you share us the detailed steps about how you insert the code snippets in your side? Do you use the same way as the above steps?

    If the same steps don't work in your side, maybe we could think about the VS IDE.

    I suggest you reset your VS settings, and then create a new simple project, test it again.

    https://msdn.microsoft.com/en-us/library/ms247075(v=vs.100).aspx

    But if a simple app worked well, but just your specific app has this issue, to really make sure that it is not related to the project files, please delete .suo file, and then re-open the .xxproj file, clean and build your solution, test it again. Or you could create a new blank solution, and then copy all project files to the new solution, test it again.

    If I misunderstood this issue, please feel free to let me know.

    Sincerely,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Sajid Ali Khan Wednesday, November 11, 2015 11:33 AM
    Tuesday, November 10, 2015 7:09 AM
    Moderator
  • Hi Jack,

    Thanks for the great response. Perhaps as I mentioned the code snipits are not working by pressing Tab Key Twice.

    As you asked for screen shot; so when I simply type "prop" and then hit Tab two times then the code snippets are not called through that;

    

    Other ways which you mentioned are working, perhaps! hit the tab twice is the fastest way to use code snippets, which is not working here my bad! : - (

    THANKS!


    Sajid Ali Khan

    Tuesday, November 10, 2015 7:23 AM
  • Hi Sajid Ali Khan,

    I use the VS2015 Enterprise version(not install the update 1 RC).

    Double click Tab two times, I will get the result like the screen shot 2.

    Like the screen shot 2 in your reply, I just put the mouse under the line "prop", and then just click tab for one time, it also inserts the code Snippet.

    So it seems that it worked well in my side, do you test it in other VS2015 machine? Like my previous reply, please reset your VS settings, and then test it again.

    Please also make sure that it is not the add-ins' issue in your VS IDE, you could run your VS in safe mode.

    https://msdn.microsoft.com/en-us/library/ms241278.aspx

    If you install the update 1 RC, I will install it in my machine, and share the result later.

    Best Regards,

    Jack 


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, November 10, 2015 7:58 AM
    Moderator
  • Hi Jack,

    Thanks for the great response, perhaps the issue is still remain even after doing everything as you said. Also run my VS2015 in Safe Mode, but the issue remains. : - (

    * I'm using VS2015 Enterprise Edition (Not 1 RC).


    Sajid Ali Khan

    Tuesday, November 10, 2015 8:19 AM
  • Hi Sajid Ali Khan,

    Do you test it in other VS 2015 machine? Whether other Environment still has this issue?

    In addition, what is your real Windows Environment in your side?

    For example, I use the VS2015 English version in windows 8.1 or windows 10 English Environment.

    Since it works well in my side, one possible reason I could guess is that maybe it is the VS setup or the language Environment issue.

    You could collect the VS setup log, so we could know that whether it is the VS setup issue.

    You could use http://aka.ms/vscollect  to gather the VS and .Net Frameowrk installation logs. After using it, you will find vslogs.cab from %temp% folder. You could check the setup log, or you can upload the file to Onedrive and share the link here, I will analyze the log file.

    But if we make sure that it has no setup error, it would be not easy for us to get the real reason directly.

    Please run your VS as the admin, test it again. The reason why I suggest you test it in other VS2015 machine is that maybe we could find much more useful information in different Environments.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, November 11, 2015 2:46 AM
    Moderator
  • Hi Jack,

    I would really want to thanks for your great response. Now I repair my VS2015 and finally now code snippets are working fine for me by hitting Tab two times.

    And Yes there're lot of issues with Setup. The Setup of VS2015-Enterprise x64 is downloaded from MSDN Subscription Download Portal. And from the first installation it is giving issues. And every time issue resolve either by Repair or by Reinstall. There're list of issues which is listed bellow;

    i) First time it was the issue of UWP Project. When we create the the UWP Project then an error message showed that tells about Path Error every time. Which resolve after Repair the VS.

    ii) Second time it was the issue of Windows 10 Emulator, When the Project create, it was not showing the Windows 10 Emulator and when we run the  Standalone Setup then the setup shows all is let. Which also resolve after Repair.

    iii) Third time, it was the issue of ASP.NET Web Project. When we create a Project, it doesn't shows us the option to select the Project type and directly create the empty ASP Project. Which also resolve after Repair.

    iv) This time, it was the issue Code Snippets. Which also resolve after Repair. Perhaps all the previous issues where also happened with my fellows at Microsoft. (But the snippet issue was only happened with me so I posted here).

    Wish these setup will be resolve in Update 1.

    Thanks again for your great assistance... : - )


    Sajid Ali Khan

    Wednesday, November 11, 2015 6:36 AM
  • >>Now I repair my VS2015 and finally now code snippets are working fine for me by hitting Tab two times.

    Glad to know that you have resolved this issue, Sajid Ali Khan:)

    If so, you could mark the useful reply as the answer, so it would be helpful for other members who get the same issue as yours.

    In addition, this forum is to discuss the VS IDE usage, if you meet any VS setup issue in the future, please feel free to post issues to the Visual Studio Setup and Installation forum, there you would get dedicated support.  

    Have a nice day,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, November 11, 2015 9:08 AM
    Moderator
  • Please, can bootstrap snippet be added to the toolbox of visual studio? Am writing a Django web app in visual studio and i need bootstrap.
    Wednesday, November 16, 2016 5:40 AM