resharper

Is it possible to get a warning if return value is not used?

大兔子大兔子 提交于 2019-12-06 19:16:47
问题 I have a extension method, which returns a value. In this case it should set a specific bit in an byte: public static byte SetBit(this byte b, int bitNumber, bool value) { if (value) { return (byte)(b | (1 << bitNumber)); } return (byte)(b & ~(1 << bitNumber)); } The returned value needs to be assigned to a variable again, because I can not combine this and ref : byte myByte = 3; myByte = myByte.SetBit(1, false); It is easy to forget the assignment by accident. Someone can think, the method

Resharper gotchas [closed]

谁都会走 提交于 2019-12-06 18:50:04
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . i absolutely adore ReSharper and would not work without it, but there are a few gotchas that i have run into and learned to avoid: Allowing ReSharper to rename string literals automatically can really bite you in such instances as when your object variables match column names in

Disable auto-indent of comments with Visual Studio 2015

时间秒杀一切 提交于 2019-12-06 18:48:36
问题 I have looked and searched for ways to disable indentation of comments when I save C# files in Visual Studio 2015 with Resharper 9.0.0.0 installed. I'd like to pseudocode before I start writing actual code. However I have been tweaking with both Visual studio's and Resharper's settings to no avail. So for example I want the comments to look like: private string ToggleString(string input) { // If input.length is between 1-100 // All the uppercase letters converted to lowercase. // All the

Can't run MSTest unit tests via Resharper after upgrading to VS 2012 Update 2

我与影子孤独终老i 提交于 2019-12-06 18:20:19
问题 All tests are in pending state. I can not run or debug them. I see that others are experienced the same issue: http://youtrack.jetbrains.com/issue/RSRP-339546 回答1: Jetbrains are on the case already: We will be releasing an update to ReSharper 7 to fix the issue with the test runner and Visual Studio Update Pack 2. — JetBrains ReSharper (@resharper) April 5, 2013 回答2: Jetbrains fix it: http://youtrack.jetbrains.com/issue/RSRP-339987 Seems to work in most case, still not with Windows Phone. 回答3

How do I set the ReSharper default Company and Copyright?

天涯浪子 提交于 2019-12-06 17:28:56
问题 I just installed Stylecop 4.5RC along with ReSharper. When I create a new class, I see that I am now compliant (yay!), but I want the company to be my company, not Microsoft. I also have too much to do to have to worry about updating the copyright text. How do I fill these in by default? // ----------------------------------------------------------------------- // <copyright file="ReaderResultTypes.cs" company="Microsoft"> // TODO: Update copyright text. // </copyright> // -------------------

Is there a visual studio automatic save configuration setting?

扶醉桌前 提交于 2019-12-06 16:37:59
问题 I use the java IDE IntelliJ IDEA and one of the features I like is that there's no saving. Everything's always saved and you just use history navigation. I tend to have both editors open and I'm always forgetting to save in VS. I'm running vs 2008 with resharper 4.5 but as far as I can tell this isn't achievable or configurable. Any suggestions? 回答1: This works great for me in VS 2015. The name of the plugin is NoMorePanicSave2015. It does an equivalent of Ctrl + Shift + S when Visual Studio

Resharper convert auto-property to full property

别等时光非礼了梦想. 提交于 2019-12-06 16:36:30
问题 I found the opposite here, but I need to frequently change from auto-property to full property - would it be possible to automate that (and with a shortcut perhaps): From Auto-Property public string FirstName { get; set; } To Property with Backing Field private string _firstName; public string FirstName { get { return _firstName; } set { _firstName = value; } } Obviously, I would then change the full property further ... 回答1: Place your cursor on the property name, then wait a second or two.

Where is the color setting for the Active Symbol Highlighting Feature in Visual Studio 2013

拜拜、爱过 提交于 2019-12-06 06:03:11
问题 Anytime my cursor is on a symbol or keyword VS2013 (or some plugin i have) highlights all matches of those instances: I don't mind the highlighting; however, this exact color is annoying with the sons-of-obsidian theme (or any dark background). I would love to know which setting under Tools->Options->Fonts and Colors controls this so that i can fix it... (As far as I can tell, none of the options adjust it, which makes me think it could be one of the plugins i have... Plugins: Resharper 8.2

ReSharper API… Uh… where is it?

梦想与她 提交于 2019-12-06 05:43:39
问题 Ok I must be having a blonde moment, but for the life of me I can't find where to download the ReSharper API, to use with the project I got from here. Any help or links would be greatly appreciated. 回答1: Api information: http://www.jetbrains.com/resharper/features/open_api.html You mostly need to reference various DLLs in the bin directory of the Resharper folder, then you can get started playing around. If you don't have a license to the product, that would be an obvious prerequisite. Edited

How best to deal with gigantic source code files in Visual Studio

会有一股神秘感。 提交于 2019-12-06 05:35:22
问题 I'm working on a project which makes substantial use of code generation. Some of the files it generates contain >0.25 million lines of code. VS (2K5) doesn't cope too badly, but R# (4.01) throws an out of memory exception every two minutes or so. Splitting them out into partial classes/separate files isn't an option in the immediate term, though it may be later. Are there any clever IDE tricks to dealing with this? EDIT: so people are immediately saying (very sensibly) 'don't have a file that