resharper

Disable/Customize comment (re-)formatting in Resharper when using code cleanup

喜欢而已 提交于 2019-12-23 20:06:17
问题 Is there a way to define how the comments are "cleaned" using Resharper (6)? I didn't find a solution to this problem. Before code cleanup: /// <summary> /// This is a comment. /// </summary> public class MyClass { ... <not yet cleaned code is here> } After code cleanup: /// <summary> /// This is a comment. /// </summary> public class MyClass { ... <cleaned code is here> } Wanted result: /// <summary> /// This is a comment. /// </summary> public class MyClass { ... <cleaned code is here> }

In ReSharper 7, is it possible to extend syntax highlighting of strings?

╄→尐↘猪︶ㄣ 提交于 2019-12-23 19:45:34
问题 ReSharper has a fancy feature that highlights format variables in e.g. string.Format(): Now, I have written an extension to format strings fluently like: public static string FormatWith(this string me, params object[] args) { return string.Format(me, args); } So I can do: Now I would like to implement similar syntax highlighting for the {0} and {1} whenever a string is followed by .FormatWith . Is this possible in ReSharper? 回答1: You can do this by using StringFormatMethodAttribute in

Visual Studio doesn't remember changes to settings

好久不见. 提交于 2019-12-23 19:17:17
问题 I've noticed that my VS15 forgets changes I make to the settings in options and check boxes under Tools on reboot. For instance, when I exchange a string in a document, I get the pop-up telling my how many substitutions have been made. There's the check box showing/hiding this message next time. I uncheck it and fairly enough the pop-up doesn't come up again. Until I restart VS, that is. After that, the pop-up is back! The same goes for many other options (typical NuGet packages' suggestion

Resharper says OnPropertyChange set member can be private while not true

烂漫一生 提交于 2019-12-23 17:19:41
问题 I use C#, MVVM, WPF and Resharper. When using the following code: public bool CombiBanksSelected { get { return _selectedBanksType == ESelectedBanksType.CombiBanks; } set { I get a warning of Resharper: Make set accessor private. When making the set method private, I get an InvalidOperationException: A TwoWay or OneWayToSource binding cannot work on the read-only property ''CombiBanksSelected'' of type ''PcgTools.ViewModels.PcgViewModel.' Of course I can suppress it by adding: public bool

How can I deactivate a single Live Templates in Resharper?

若如初见. 提交于 2019-12-23 15:47:03
问题 For example: I don't like the "prop" Live Template of R# and want to use the Visual Studio Snippet, like i did before I installed R#. 回答1: Go to ReSharper > Live Templates > C#, and deselect "prop" 回答2: Workaround by @gorohoroh: Press TAB twice after specifying keywords in template placeholders. 来源: https://stackoverflow.com/questions/5800954/how-can-i-deactivate-a-single-live-templates-in-resharper

Using Resharper Unit Test Runner for MSTest via Gallio

不打扰是莪最后的温柔 提交于 2019-12-23 14:49:27
问题 I am attempting to get the Resharper test runner to recognize my MSTest unit tests via Gallio. I have the following installed: VSTS 2005 8.0.50727.762 Resharper 4.1 Gallio 3.0.0.285 I am also running Windows XP x64. The unit test options only shows NUnit as being available. I am thinking that I must have some versioning wrong. Can someone point me in the right direction? Am I barking up the wrong tree and this is only works in VS2k8? UPDATE: Well I updated Gallio to GallioBundle-3.0.4.385

ReSharper suggests the usage of var - Can it do the opposite thing aswell?

白昼怎懂夜的黑 提交于 2019-12-23 13:26:10
问题 Resharper does suggest me the usage of the var-keyword. Unfortunately, my new employer does not use var-keyword at all. Thats why I am having some trouble, because I am used to use the var-keyword. Is it possible to let resharper do the opposite thing? So, it warns me everytime I use the var keyword and suggests me to declare the variable explicitly? Thanks in advance! Edit:\ I dont want to turn off the warning or something like that, I want to turn that Setting around, so I will get a

Resharper: File header text not automatically used for new files

杀马特。学长 韩版系。学妹 提交于 2019-12-23 13:00:07
问题 I am using VS2010, Resharper 8.0.1, StyleCop 4.7.45. I have defined a File header text in the resharper options and (wrongly) assumed it would then be used when refactoring (using "move class to a new file to match file name" function). This also doesnt use the Visual Studio file templates that one may modify (see How do I edit the Visual Studio templates for new C# class/interface?). Is there a way to enable that behaviour, or do I always have to manually trigger Code cleanup afterwards? 回答1

Resharper keeps disabling “Show live semantic errors” in Visual Studio 2010

那年仲夏 提交于 2019-12-23 11:39:07
问题 How do I keep Resharper from disabling the "Show live semantic errors" & "Underline errors" options in Visual Studio? It seems that whenever I go and manually enable them, they somehow revert back to disabled after some time - I suspect Resharper of doing this. Is there any remedy for this? 回答1: You have to turn off ReSharper's own code analysis if you want the VS error detection options to be preserved. To do that, go to ReSharper > Options > Code Inspection > Settings, and deselect "Enable

No intellisense in ASP.Net Core

旧城冷巷雨未停 提交于 2019-12-23 10:14:37
问题 After installing ASP.Net Core via Visual Studio ==> New Project ==> Web ==> ASP.Net Web Application ==> OK ==> ASP.Net 5 Templates. Restarted the system after the installation then create a new project of ASP.NET 5 Template ==> Empty website. I dont get any intellisense and all class names are in RED as if the Visual Studio or Resharper is unable to locate the definition. Here are some screen shots. and no intellisense When using services object, I was expecting services.AddSingleton, service