resharper

Resharper: how to suppress warning “Field xy is never used” in XAML

[亡魂溺海] 提交于 2019-12-08 10:21:22
问题 I want to suppress a warning in my xaml file. I applied the corresponding quick fix option to "Disable once warning by comment". However, the warning is still active. How do I correctly suppress the warning? I would like to keep the name because it tells something about the purpose of the element. (An alternative would be to remove the name and use a comment.) Edit The issue is only valid vor Resharper version Build 8.2.0.2160. After updating to 8.2.3 the suppression works correctly. (And in

How to make an NUnit TestProject use its own config when run?

为君一笑 提交于 2019-12-08 09:52:47
问题 Is it possible to let Resharper (or NUnit?) know that I want each test to look for an App.config under it's own project, even when running all tests in a solution together? Background: I'm using NUnit and the test-runner that ships with Resharper, and I've got several test-projects in the same solution. Some of my tests depend on config-files located under their respective projects. When I run a test-project by itself, it will use it's internal App.config , and everything works fine. When I

VS2013 IntelliSense overlapping ReSharper's one

我与影子孤独终老i 提交于 2019-12-08 08:44:24
After installing ReSharper I've noticed a problem with the IntelliSense; In the image it is clearly visible that the IntelliSense of Visual Studio is displayed over the one of ReSharper (which by the way has the focus, so using the arrow keys will move the highlight section of the completion list below). I've tried to do several things without any result (always with VS restart): Switch from ReSharper IntelliSense to VS (back and forth) Limit ReSharper IntelliSense to some selected languages (i.e. C#) Completely disable VS IntelliSense ('Tools | Options | Text Editor | All languages' and

How to make an NUnit TestProject use its own config when run?

旧街凉风 提交于 2019-12-08 06:34:25
Is it possible to let Resharper (or NUnit?) know that I want each test to look for an App.config under it's own project, even when running all tests in a solution together? Background: I'm using NUnit and the test-runner that ships with Resharper, and I've got several test-projects in the same solution. Some of my tests depend on config-files located under their respective projects. When I run a test-project by itself, it will use it's internal App.config , and everything works fine. When I try to run all the tests in the solution, or use the shortcut to run all tests in current test session

Does Resharper contain a Convert to Direct Cast refactoring?

懵懂的女人 提交于 2019-12-08 06:15:39
问题 I have code like this all over the code base: MultiList ml = this.CriteriaList.ItemByName(SC_SAM_CATEGORIES) as MultiList; I want to convert it to direct cast: MultiList ml = (MultiList) this.CriteriaList.ItemByName(SC_SAM_CATEGORIES); with a possible bonus of replacing MultiList ml with var ml . Does Resharper contain a refactoring like this, perhaps via an addin? If so, how do I turn it on? 回答1: Yes, you can actually compose your own refactorings through Custom Patterns : see this link In

CodeRush not working?

≯℡__Kan透↙ 提交于 2019-12-08 04:23:45
问题 I was using Resharper and I wanted to try CodeRush so I suspended Resharper and installed CodeRush Xpress. When I installed CodeRush version 2010.1.4 (from this downlad page) the shortcuts did not work. I tried F2 and other shortcuts that schold work but they did not. However I was able to invoke some CodeRush functions by clicking right mouse button and choosing "Refractor" from the drop down menu. When I choose it there is CodeRush action menu where I can select for example "Rename" but as

How do I get a window context so I can create NavigationOptions in a resharper plugin

北战南征 提交于 2019-12-08 04:21:35
问题 I have a navigation plugin which I want to extend to allow support for context navigation. I've got everything I need except for the NavigationOptions instance. In my INavigateFromHereProvider I get called with an IDataContext so can create the NavigationOptions from this using the NavigationOptions.FromDataContext method. Great. In my context action I don't get called with a IDataContext , I get given a ICSharpContextActionDataProvider during construction. I can get my IDeclaredElement from

Resharper: How to hide suppressed warnings in Inspection Results?

谁说我不能喝 提交于 2019-12-08 03:49:33
问题 I suppressed a Resharper warning in a VB.NET class file (*.vb). As expected, the warning is not highlighted at the border of the text editor. If I show all Resharper warnings for my project I would expect that the suppressed warning is neither shown in the Inspection Results view. However, it is shown, see screen shot. How to I hide warnings in the InspectionResults that are suppressed in the code with an annotation? I am using Resharper 8.2.3 (If you have issues with public properties in

Using Resharper test runner with Jasmine 2.0

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-07 14:48:02
问题 I'm trying to use the Resharper (v8.2) test runner in VS2013 with Jasmine 2 but I'm having an issue calling a 'global' beforeEach The spec file has a 'script reference' to a SpecHelper.js that has a call to beforeEach. The SpecHelper code is running but at the time that the SpecHelper is loaded Jasmine has not been loaded so beforeEach is not available. The code looks like this: ///<reference path="../../../../jasmine/tests/BaseReferences.js"/> then in the SpecHelper beforeEach(function() { /

ToString and string concatenation - unexpected behavior

拥有回忆 提交于 2019-12-07 14:16:27
问题 According to the internet when you do String someString = "" + object1 + object2 + object3; ToString() is called on each of the objects. But this is not happening! This code: String a = "a" + foo; String b = "b" + foo.ToString(); Console.WriteLine(a); Console.WriteLine(b); Prints: a b("key":"foo") How is it possible? I made Resharper full cleanup on whole project and it broke code in some place because it removed ToString() in such string concat!! Lost many hours.. Edit: This problem happened