resharper

How can I get Resharper to run tests in debug, when I get debug is “Inconclusive: Test not run”

与世无争的帅哥 提交于 2019-12-10 12:28:14
问题 How can I get Resharper to run tests in debug, when I get debug is "Inconclusive: Test not run" Running any MsTest test in Resharper test runner is Ok, but if I try to debug, the R# test runner just displays Inconclusive: Test not run This happens even with a simple test, e.g. [TestClass] public class BasicTests { [TestMethod] public void Placeholder() { Assert.AreEqual(1, 1); } } But the build-in test runner in Visual Studio works for both just running and for debug Additional info: It

How to navigate to feature file from resharper test session window in Visual Studio 2012?

≡放荡痞女 提交于 2019-12-10 10:02:45
问题 For acceptance testing I use TeckTalk SpecFlow in Visual Studio 2012. When I run all specflow scenarios, resharper unit test session windows is opened I can see all test results. Like on screen shot below. The question is, when I see failed test (scenario) in some feature file, how can I navigate directly to this feature file from resharper session window to edit it??? 回答1: It seems to work perfectly well if run via the new VS2012 Test explorer, which on my machine worked automatically from

VS 2010: Can’t insert mvvm-light snippet using shortcut - incompatibility with resharper 5?

廉价感情. 提交于 2019-12-10 09:57:07
问题 i recently installed some snippets that come with the mvvm-light framework i am using. And sure enought i checked via Tools > Code Snippet Manager and they are installed under "My Code Snippets". If i do insert Snipper (right click in code window) or CTRL K + CTRL X then i can search within all available snippets.... But i do believe its possible to just type the shortcut key (in this case it is mvvmlocatorproperty) and pressing tab inserts the snippet BUT when i type the shortcut key it is

nullable type and a ReSharper warning

≯℡__Kan透↙ 提交于 2019-12-10 04:13:18
问题 I have the following code: private static LogLevel? _logLevel = null; public static LogLevel LogLevel { get { if (!_logLevel.HasValue) { _logLevel = readLogLevelFromFile(); } return _logLevel.Value; } } private static LogLevel readLogLevelFromFile() { ... } I get a ReSharper warning on the return statement about a possible System.InvalidOperationException and it suggests I check _logLevel to see if it is null first. However, readLogLevelFromFile returns LogLevel , not LogLevel? , so there is

Intellisense for extension methods?

ε祈祈猫儿з 提交于 2019-12-10 03:26:29
问题 Is there a way to get intellisense for extension methods from classes that are not currently within the usings, but referenced in the solution. It would be great convenience to be able to just type and not have to add the using when using an extension method the first time in a class. 回答1: I believe what you are looking for is the Import Symbol Creation with Re#. I use this all the time when accessing members that are not part of the current using statements. In essence, Re# will look through

How to pull a method out of its class (and into a new or existing)?

与世无争的帅哥 提交于 2019-12-10 03:14:28
问题 What is the easiest way of pulling an excisting method out of its class and into a new class using Visual studio 2010 / Resharper? Edit: I use Resharper version 5. 回答1: Starting with public void Method() {} First, make the method static using the "Make Method Static" command. public static void Method(){} Then, add a local variable of the type of the new class: public static void Method(){Class2 me = new Class2();} Then, use Introduce Parameter public static void Method(Class2 me) {} Then use

resharper intellisense problem with extension methods

泪湿孤枕 提交于 2019-12-10 03:12:48
问题 so, I have a repository defined with a method like this: IQueryable<Customer> Customers{...} and elsewhere an extension method to filter the customers like so: public static IQueryable<Customer> WithID(this IQueryable<Customer> customers, int ID){...} and this woks nicely, letting me use the repository like this: var c = repo.Customers().WithID(5).Single(); but the problem is, ReSharper messes up the Auto-Completion on this big time. When I type var c = repo.Customers().Wi I get nice

List of Resharper Default Formatting and Rules

做~自己de王妃 提交于 2019-12-10 03:10:36
问题 This question was migrated from Software Engineering Stack Exchange because it can be answered on Stack Overflow. Migrated 7 years ago . I'm trying to find a list of all the default formatting and rules that Resharper enforces. Unfortunately, I'm not having any luck. We use the tool, but want to provide a document of standards to new hires so they can view the standards prior to coding. 回答1: Under the ReSharper menu, then Options, you'll find the current rules and conventions ReSharper is

Can I tag a C# function as “this function does not enumerate the IEnumerable parameter”?

时间秒杀一切 提交于 2019-12-10 01:50:15
问题 Multiple enumeration of the same enumerable is something that has been a performance problem for us, so we try to stomp those warnings in the code. But there is a generic extension function that we have for throwing null parameter exceptions that generates a lot of these warnings. Its signature looks like this: public static void VerifyArgumentIsNotNull<T>(this T value, string valueName) where T : class All it does is check for null and throw a nicely formatted and localized (for whichever

Visual Studio: Missing Ctrl+O+O, Ctrl+T Eclipse analog

被刻印的时光 ゝ 提交于 2019-12-09 22:02:50
问题 I very like Eclipse Ctrl + O + O hotkey which includes in the list of members not only members of current class, but also all the members of all super-classes. "Quick type hiererchy" feature also is pretty useful. Resharper has Alt + End and Alt + Home keys, but it doesn't organize result in a tree what is very handy. Is it possible to get mentioned functionality in VS? 回答1: ReSharper provides the Type Hierarchy window (ReSharper > Inspect > Type Hierarchy) for investigating inheritance. File