resharper

Is it possible to use Rosyln or Resharper to detect possible DivideByZero cases?

北城余情 提交于 2019-12-22 08:35:12
问题 I'm trying to determine if there's a programmatic way to check for possible DivideByZeroException in my codebase. My codebase includes a series of relatively simple to relatively complex formulas, approximately 1500 of them (and growing). When new formulas are written, care must be taken to ensure that division is done safely to avoid exceptions during processing of these formulas. E.g. decimal val1 = 1.1m; decimal val2 = 0m; var res = val1/val2; //bad var res = val2 == 0 ? 0 : val1/val2; /

Resharper: “Property 'VS100COMNTOOLS' is not defined”

旧巷老猫 提交于 2019-12-22 08:34:20
问题 I get the above as an issue upon code inspection of an MSTest project. The issue relates to the .csproj itself. What does it mean? Do I need to do anything about it ? I know about the %VS100COMNTOOLS% environment variable, so I am guessing Resharper expects that path to be in the runtime environment of the project, and for some reason it's not ? 来源: https://stackoverflow.com/questions/4045780/resharper-property-vs100comntools-is-not-defined

ReSharper confused my visual studio - reset visual studio with defaults

[亡魂溺海] 提交于 2019-12-22 08:24:20
问题 I used ReSharper in order to do some tasks and after uninstalled it because it confused me (all the highlights ad the quick links.. I prefer the default behaveior of visual studio). After I uninstalled it - compilation errors that used to be underlined with red line now has no underline at all. How can I reset visual studio with the defauld behaveior? 回答1: Try Tools > Import/Export Settings > Reset All Settings 回答2: The ReSharper team has accounted for this use case for the last few versions

Resharper - convince management [duplicate]

馋奶兔 提交于 2019-12-22 06:46:26
问题 This question already has answers here : Closed 9 years ago . Possible Duplicate: Business Case for Resharper Hi Guys! I've just recently graduated and I'm working for my first company. During college, one of my professors had every computer loaded with Resharper and I loved it! I bought myself a personal license for it and have been using it ever since. But at my new job, only a select few (senior developers mostly) are using Resharper. When I asked my supervisor to buy a license for myself,

What causes this SqlException: A transport-level error has occurred when receiving results from the server

妖精的绣舞 提交于 2019-12-22 05:43:08
问题 Here is the full error: SqlException: A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 1 - I/O Error detected in read/write operation) I've started seeing this message intermittently for a few of the unit tests in my application (there are over 1100 unit & system tests). I'm using the test runner in ReSharper 4.1. One other thing: my development machine is a VMWare virtual machine. 回答1: I ran into this many moons ago.

Stop VS 2010 from Auto Creating Braces After else keyword

冷暖自知 提交于 2019-12-22 05:21:15
问题 I'm using VS 2010, and I'm getting constantly annoyed when I type "else" and then it auto returns line and adds braces. Something like: else { } I cannot imagine I'm the only one who often puts one-liners after the else and prefers no braces. How do I stop this from happening? 回答1: I also found this behavior very annoying. My first attempt involved opening the Templates Explorer (ReSharper / Templates Explorer...), selecting C#, then unchecking "else". This did get rid of the braces.

Stop VS 2010 from Auto Creating Braces After else keyword

橙三吉。 提交于 2019-12-22 05:21:11
问题 I'm using VS 2010, and I'm getting constantly annoyed when I type "else" and then it auto returns line and adds braces. Something like: else { } I cannot imagine I'm the only one who often puts one-liners after the else and prefers no braces. How do I stop this from happening? 回答1: I also found this behavior very annoying. My first attempt involved opening the Templates Explorer (ReSharper / Templates Explorer...), selecting C#, then unchecking "else". This did get rid of the braces.

resharper custom pattern replacement with negative equality expression

对着背影说爱祢 提交于 2019-12-22 05:09:20
问题 I have a rule in resharper to find calls to Nullable.HasValue T? foo; //... if(foo.HasValue) {} //And it offers to replace with a comparison directly with null: if(foo != null) {} This works great, but when it encounters a negated .HasValue , the result is a little strange. if(!foo.HasValue) {} //is replaced with if(!(foo != null)) {} Then resharper wants me to simplify the statement to just if(foo == null) //ideally it would automatically get to this without the extra step: if(foo == null) {

Go to closing Tag in Visual studio (using Resharper)?

北慕城南 提交于 2019-12-22 04:47:07
问题 I'm using the latest Resharper (v 8.1) with visual studio 2010. Is there a keyboard shortcut/feature to "Jump to closing tag" ? For example : if the cursor is on the first tr : I want the cursor to go to the closing tr which is </tr> Is there any shortcut for this ? (p.s. - something like goto matchine brace but for Xml/html tags) 回答1: From what I've gathered there's no shortcut for this in either reSharper or Visual Studio. A "work around" would be to collapse the tag using Ctrl + M + M,

Keyboard Shortcut for Hints

爱⌒轻易说出口 提交于 2019-12-22 04:19:16
问题 usually when I select a hint such as refactoring a certain line that I am on, when the purple hint icon or the light bulb icon shows to the left, I click on it then select the refactoring I desire. I don't want to use my mouse. How do I get that dialog open on the left...really any dialog on the left that resharper unobtrusively shows you? Just trying to figure out a faster way than with my mouse. First thing is to figure out how to get that dialog up with the keyboard, not click on it with