resharper

How to install extension for Resharper command-line tools

梦想的初衷 提交于 2019-12-25 09:28:26
问题 We're currently using the Resharper command-line tool 2016.3 on our CI build server to inspect code for issues at build time. It's working pretty well but I still have an issue and I can't find any proper documentation on that : how do I install and configure an extension using the command line. For example, I want to add the Cyclomatic complexity extension to my analysis. Documentation said to use the -x switch with the name of the extension (PowerToys.CyclomaticComplexity). The code

Resharper rename feature similar to Visual Studio rename - is it possible?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 02:12:26
问题 When you're using Visual Studio refactoring features you may change the name of variable / class name, etc., press ctrl + . and you're able to apply rename to this change. When you're using Resharper you have to say up front that you want to rename it (you have to press ctrl + r + r or f2). Is it possible in Resharper to change the name and then say you wanted full rename? Thanks in advance for help! 回答1: Yes. Starting from version 6.0, you can change the name of a symbol declaration first,

Resharper rename feature similar to Visual Studio rename - is it possible?

旧巷老猫 提交于 2019-12-25 02:11:45
问题 When you're using Visual Studio refactoring features you may change the name of variable / class name, etc., press ctrl + . and you're able to apply rename to this change. When you're using Resharper you have to say up front that you want to rename it (you have to press ctrl + r + r or f2). Is it possible in Resharper to change the name and then say you wanted full rename? Thanks in advance for help! 回答1: Yes. Starting from version 6.0, you can change the name of a symbol declaration first,

red-squiggle non-existing dependent name (e.g. C<T>::nonMember ) as error

只愿长相守 提交于 2019-12-25 01:00:30
问题 How to make Resharper syntax-highlight non-exist dependent name (e.g. member field) as error? In the below code, I expect a.nonMember to has red squiggle. template<class T>class Test1{ public: int member; }; template<class T>void f(){ Test1<T> a; a.member=5; a.nonMember=8; //<-- expect red squiggle here } However, there is no such red squiggle. I believe there must be such a feature, because Resharper can already recognize all fields of Test1<> correctly (shown in the following image). 回答1:

How can I prevent ReSharper from inserting a blank line between my MSpec fields?

余生颓废 提交于 2019-12-24 17:09:25
问题 When I write an MSpec context like this: [Subject(typeof(TheType), "Concern")] internal class when_this_test_is_run { Establish context = () => { // some code... }; Because of = () => Do.Something(); It should_do_this; It should_do_that; } When I let ReSharper reformat the code, it always inserts a blank line beneath any of the delegates that is an anonymous method, i.e. has a { block } as its body. It doesn't insert blank lines after delegates that are simple expressions. So in the example

How to test spa js modules with resharper testr jasmin?

橙三吉。 提交于 2019-12-24 16:03:24
问题 After reading about javascript unit testing / bdd in VS I found that you could use a combination of: - ReSharper - support for PhantomJS headless + Jasmine/QUnit - Testr - mock Require dependencies I used Jasmine in a test script and was able to successfully run some simple tests, with functions declared in the same file. However, I could not find / build a working end to end example for testing a js module with dependencies. I am trying to build on the example used in the SPA Jumpstart

How does this setter end up working? (ListView MultiSelect)

别来无恙 提交于 2019-12-24 15:53:31
问题 I have a ViewModel which I'm using as an ItemsSource for a ListView , that implements an interface called ISelectable : /// <summary> /// An interface that should be implemented by a ViewModel that can be /// marked as selected, when multiple selections are allowed. /// </summary> public interface ISelectable { /// <summary> /// Gets or sets a value indicating whether this instance is selected. /// </summary> /// <value> /// <c>true</c> if this instance is selected; otherwise, <c>false</c>. /

Resharper is suddenly showing red for Razor syntax

坚强是说给别人听的谎言 提交于 2019-12-24 14:26:04
问题 I don't know, all of sudden Razor syntax showing in Red. I suspended and resumed and also closed VS and restarted still the same. Anything else to do? 回答1: Check the references in the /Web.config and the Views/Web.config. If they are correct, try a clean and rebuild. If that still does not work, you can manually delete the bin folder and VS will recreate it anew. 来源: https://stackoverflow.com/questions/29898607/resharper-is-suddenly-showing-red-for-razor-syntax

ReSharper and NUnit's multiple domains

淺唱寂寞╮ 提交于 2019-12-24 13:08:43
问题 I recently had to enable this option in ReSharper: Use separate AppDomain for each assembly with tests Looking at the NUnit documentation, I suspect the option above executes NUnit with the parameter "domain/multiple", for which "a separate test domain is created for each assembly". Could you please confirm me that is true? 回答1: Yes, this option corresponds to the /domain=Multiple command line parameter. Note that ReSharper doesn't use the console runner. Instead it directly links the NUnit

unit test fails in r# but passes in mstest

落爺英雄遲暮 提交于 2019-12-24 08:56:47
问题 I'm getting the error below when running Unit Tests in R#, but the tests pass as expected in Visual Studio MSTest, this is occurring with anything that touches the entity framework, other tests work without a problem, i thought this was because a dll was not deployed but made sure that all the dll's are marked as deploy local = true, also made sure that profiling is turned off as I read that this might cause issues with R#, the exception is pretty strange, can't really find any rhyme or