resharper

Let Resharper force this keyword on fields

 ̄綄美尐妖づ 提交于 2019-12-03 04:14:50
Does anyone know if it is possible to have resharper force the use of the this keyword when it can be used? For fields and such... Resharper is capable of showing where it can be removed, but our coding standard tells us to use the this keyword. In ReSharper Options, under Code Editing -> C# -> Code Style there is an option for Use "this." qualifier for that you can set for fields, properties, events, and methods. Checkout the StyleCop for Resharper plugin (part of the StyleCop project ). You can then set the "default" severity for StyleCop to Error (or just this particular rule) and it will

Referring to a generic type of a generic type in C# XML documentation?

梦想与她 提交于 2019-12-03 04:12:38
Writing some XML documentation for a predicate helper class. But I can't figure out I can refer to an Expression<Func<T, bool>> without getting a syntax error. Is it even possible? I have tried this: <see cref="Expression{Func{T, bool}}"/> But I get a red squiggly line under {T, bool}} . This works though: <see cref="Expression{TDelegate}"/> Anyone have a clue? Update: The answer that was given (and I accepted) seemingly did work. But now I have started to get a lot of warnings about stuff not being able to resolve. I have a class called ExpressionBuilder<T> which works with Expression<Func<T,

How to make Resharper resolve path for CustomBinding MarkupExtension

寵の児 提交于 2019-12-03 04:09:05
I want to create some extended Binding-Markup-Extension, which behaves just like a normal WPF-Binding but does some things more (use different defaults, maybe add some behavior, etc.). Code looks like this: public class CustomBindingExtension : Binding { .. some extra properties and maybe overrides ... } It all works fine including XAML-intellisense, except I just can't make Resharper resolve my Binding-Path correctly. I.e.: using this code I can [Strg]+Click on 'CurrentText' and Resharper lets vs2010 navigate to the code defining the CurrentText-Property. <UserControl x:Name="uc" ...>

How to share the same Resharper settings between multiple solutions, with no manual intervention?

不羁岁月 提交于 2019-12-03 04:04:27
问题 Our projects are organized in a master solution (containing every project) and multiple smaller solutions containing groupings of related projects. I would like to share the same Resharper settings across every solution, making sure that the developers don't ever need to import configuration files in Resharper or do anything manually for that matter. The version we are using is one of the latest ones, 7.0.1. The DotSettings file checked in in TFS works great on a single solution, but

Where can I find nice Dark ReSharper (with Color identifiers = on) Themes?

99封情书 提交于 2019-12-03 03:43:13
问题 I haven't come across any decent dark Visual Studio 2008 color themes with support for ReSharper's Color identifiers turned on. Have any been published? 回答1: I created a dark theme that uses the additional color targets provided by Resharper. It is available for download here. Remove the .txt extension from the file and then import it into Visual Studio via Tools > Import and Export Settings . This settings file only contains color settings, so it won't interfere with any other settings you

Resharper uninstall - Visual Studio no longer shows correct error highlighting

流过昼夜 提交于 2019-12-03 03:27:25
问题 I've been trying out resharper and decided that I'd like to uninstall. However, after doing so, Visual Studio no longer shows red underline highlighting that it normally uses to identify the location of errors in the code. This has happened on two of our PCs so far. I've tried a reinstall and a repair, but no luck. Any ideas how I can restore the highlighting in Visual Studio? Cheers Nick 回答1: Go to Tools → Options → Text Editor → C# → Advanced , check the following options: Underline errors

Resharper always suggesting me to make const string instead of string

匿名 (未验证) 提交于 2019-12-03 03:05:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: which one is good: string sQuery = "SELECT * FROM table" ; or const string sQuery = "SELECT * FROM table" ; And why resharper always suggest me to do this? 回答1: The latter is better - it means that: This isn't an instance variable, so you don't end up with a redundant string reference in every instance that you create You won't be able to change the variable (which you presumably don't want to) There are some other effects of "const" in terms of access from other assemblies and versioning, but it looks like this is a private field

ReSharper TypeScript seems to be not working at all in my VS 2015 installation

匿名 (未验证) 提交于 2019-12-03 02:50:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: ReSharper TypeScript seems to be not working at all in my VS 2015 installation. Despite of the correctly placed TypeScript definitions ReSharper does not recognize the defined types, gives zillion red underlines, and of course intellisense does not work on the variables. The error message is for example: Could not find symbol 'JQuery' Some more diagnostics: Compiling the project in VS 2015 compiles with no error. Making an intentional error in the source then build generates one correct error message Intentionally making a spell in the type

ReSharper key bindings problem

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I use: Visual Studio 2010 Ultimate, Resharer 6. In ReSharper's options i choose Visual Studio keyboard sheme and click Apply Sheme: After that some shortcuts are not assigned, such as: Go to Declaration, Go to implementation, Find Usages, Complete symbol, etc: Try Tools -> Options, Environment -> Keyboard -> Reset Import and Export Settings, re-import C# developer settings devenv /reset Nothing helped. Configure shortcuts manually is not desirable. Help, please. 回答1: This is a known issue that affects all ReSharper shortcuts that include F12

ReSharper Abbreviations List: Where can I modify it?

匿名 (未验证) 提交于 2019-12-03 02:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using ReSharper 4.5, and what often happens when I am converting explicit properties into auto-properties, is that I will accidentally chose "Add XX to abbreviations list". Ie: I want to convert CustomerID into an autoproperty, but due to quick butterfingers, I will accidentally add "ID" to the abbreviations list instead, which I don't want to do. (I want the naming rules to use "Id" instead of "ID"). Where can I find and modify the list of custom abbreviations in ReSharper 4.5?? 回答1: In Resharper 5. see answer below. -In Resharper 4