kar*_*llo 4 c# resharper prism visual-studio
我正在使用 Visual Studio 2017 和 Prism 模板包。
在我安装 Resharper 之前,Prism 片段一直正常工作。现在我可以插入棱镜片段的唯一方法是通过
编辑 -> Intellisens -> InsertSnippet [ Ctrl + K , X]。
它们没有在 Intellisense 中弹出,当我输入代码段时,双选项卡也不起作用。我尝试禁用/启用 Prism 模板包并重新安装它,但没有任何成功。
有人可以就如何让它们重新工作而不将它们重新输入为标准的 Visual Studio 片段有任何提示吗?
PS Visual Studio 片段(prop,propg)工作正常。
Funny! Juts right now! I had the same problem! I searched and found these QA in there: How to disable ReSharper property code autocomplete/code snippet & ReSharper - How to show custom snippet in IntelliSense
In both answers, they said either do:
Resharper code snippet to use Visual Studio code snippetReSharper | Template Explorer | C# | New Template menu and create new code Snippet for Resharper.which I prefer the 2nd way more. To know more about Template Explorer in Resharper, you can read about it here.
But especially for our problems! I used below steps to add Prism code snippets to Resharper: (Also, You can do the same thing for MVVM Light Toolkit code snippets or ...)
Visual Studio | [Menu] Tools | Code Snippets Manager... | [Language]CSharp | Select Prism from tree, then Copy and paste its Location into Windows Explorer address bar. Then, You will have all code snippets files of Prism.*.snippet file that you need to add it into Resharper with your text editor.[Menu]ReSharper | Tools | Template Explorer... Then from Templates Explorer window/Tab select C# language(from Scopes panel) and click on
icon in toolbar. It will open a Template <No Name> tab inside the Visual Studio. Something look like below image:*.snippet file that you open in step 2 in your text editor, Copy lines from <Code Language="csharp"> section between <![CDATA[ and $end$]]> as I show it in below image, Then paste it into Visual Studio | Template <No Name> tab:Shortcut name and optionally a Description then hit the Save button in Visual Studio. (you can use the same codes from *.snippet file or change it as you wish!) I change it to this to make Resharper more happier!!! lol:Done!
In my case, If I type propp and press Tab key once, It will create Prism Preoperty template for me! I Hope this help someone else too !
Happy Coding!