Menu
  • HOME
  • TAGS

Resharper - not able to configure individual keyboard shortcuts

visual-studio,resharper

You can configure ReSharper's keyboard shortcuts just like Visual Studio's - in Visual Studio's own keyboard dialog - Tools → Options → Keyboard. All ReSharper commands begin with "ReSharper" if you want to filter them.

Resharper 9 File Layout: defining sort order when sorting by access modifier not possible?

c#,resharper,resharper-9.0

As it turns out the ordering can still be specified as in pre-9.0 - but with slightly different syntax: [...] <Entry.SortBy> <Access Order="private public internal protectedinternal protected"/> </Entry.SortBy> [...] The difference was that protected-internal now has to be protectedinternal instead... Also be aware that you have to do this manually...

Can Resharper 9 perform pattern search and replace on HTML markup?

html,visual-studio,twitter-bootstrap,resharper

It should work. In the search pattern dialog, make sure HTML is selected as the target language, and then just type the first HTML block in as the search pattern. You don't mention if the first block is an example, or exactly the code you want to search for. If...

prevent unassigned objects, any reason this is a bad design consideration?

c#,wpf,resharper,code-design

To keep this simplified in coding, I put a "ShowDialog()" call at the end of the constructor of the form being displayed. That sounds like an ugly design to me, personally. Constructors are designed to return a usable object - and ideally that's all they should do. I would...

Resharper is suddenly showing red for Razor syntax

c#,razor,resharper

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.

Entity Framework Integration tests failing running multiple tests that are singularly passing [Resharper, NUnit, EF6]

c#,nunit,resharper,integration-testing,entity-framework-6

I found the solution, that (after all) is pretty obvious. Below you can see the final solution. The key is the Database.SetInitializer that configure EF to initialize the database using the registered IDatabaseInitializers. EF6 allow you to use Context.Database.Initialize(true); that forces the database to run all the initializers. The boolean...

Consolidate Redundant Condition

vb.net,visual-studio-2013,resharper

Unfortunatelly Resharper is not going to be able to help you with this I think. You will probably have to clean it up manually. It shouldn't take too long to group statements inside one condition. If there are unit tests then it may make you feel more confident at refactoring...

How can I indicate result ambiguity with Resharper CodeAnnotation attributes?

c#,resharper,code-contracts,resharper-8.0,resharper-7.1

You could use canbenull: [ContractAnnotation("null => null; notnull => canbenull")] The full grammar is: FDT ::= FDTRow [;FDTRow]* FDTRow ::= Input => Output | Output <= Input Input ::= ParameterName: Value [, Input]* Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} Value ::= true | false | null | notnull | canbenull As...

Why does ReShaper suggest me to make type parameter T contravariant?

c#,resharper

So what is different between and ? The difference is that in T allows you to pass a more generic (less derived) type than what was specified. And what is the purpose of contravariant here? ReSharper suggests to use contravariance here because it sees the you're passing the T...

Visual Studio - How to refactore javascript strings from double quotes to single quotes

javascript,c#,visual-studio-2013,refactoring,resharper

ReSharper 9.0 and above has special code style setting to address this issue. This includes highlighting and bulk quick-fix, so you're able to apply it solution-wide. p.s.: If by some reason it doesn't work correctly for you, please create an issue with a code sample....

Resharper code annotations don't work when referencing the compiled dll

c#,resharper

If you're using a recent version of the annotations - such as the default source implementation copied from the ReSharper 9 settings, or referencing the official nuget package - then they are not compiled into the resulting dll, by default. The attributes are defined with [Conditional("JETBRAINS_ANNOTATIONS")] applied. This means that...

How can I tell Resharper to allow underscore tolerant method names for a specific class in a test project?

c#,unit-testing,resharper,naming-conventions

You may specify separate Naming Style settings for your Test project as described here

Resharper Disable C# 6.0 Support

c#,resharper

Click the project node in the Solution Explorer. Then look in the Property Grid (F4). You'll see a property named "C# Language Level". Set that to "Default" or your desired language level. ...

ReSharper remove unused directives In file adds summary and header to methods and parameters

c#,resharper

I found the problem: StyleCop Extension doing this. 4.7 Beta version. When I uninstall the extension everthing is okay....

Why does ReSharper tell me this expression is always true?

c#,resharper,boolean-logic,roslyn

isStaticProperty is initialized outside the loop: var isStaticProperty = propertySymbol.IsStatic; If isStaticProperty is false, then this expression: (isStaticConstructor && isStaticProperty) is always false, hence hasStaticUsage is false. If isStaticProperty is true, then this expression: (!isStaticConstructor && !isStaticProperty) is always false, hence hasInstanceUsage is false. In any case hasStaticUsage and hasInstanceUsage...

Disable automatic insertion of ByVal

vb.net,resharper

Each variable needs to be ByVal or ByRef. In some compilers (like vb.net) you can omit the "ByVal" but it will use ByVal by default. The use of ByVal has not gone away, MS just though it could save you time in typing. It sounds like you need to submit...

Resharper intellisense : how to show method return type

methods,resharper,intellisense

Here you can find the corresponding setting:

Can ReSharper run unit tests automatically

visual-studio,resharper,jetbrains

Not possible with Resharper at the moment, you will need something like NCrunch that runs your unit tests continuously in the background, highlighting code that breaks them as you write it and fails your tests.

getting message condition is always true

javascript,resharper

if (filters == "answers" || "solution") { } In the above code "solution" is true always So, Change to this if (filters == "answers" || filters =="solution") { } Example If("i") { } Above is true always. So, In your code the second condition returns TRUE always As per the...

Format Line not actually formatting.

c#,resharper,stylecop

It might be worth raising this as an issue with the StyleCop project on CodePlex. However, the CodePlex project seems to be a bit abandoned - the current ReSharper 9 plugin is provided by a community member. There's a GitHub repo (although it doesn't have source) that you could use...

Resharper: File header text not automatically used for new files

c#,visual-studio-2010,resharper,stylecop

This isn't possible in Resharper as of now. Your current solution to run Code Cleanup is the way to go. Related: https://youtrack.jetbrains.com/issue/RSRP-329925 https://youtrack.jetbrains.com/issue/RSRP-170107 It's been an issue / feature request reported back since at least 2010. ...

How can I split same-project unit tests into separate assemblies?

c#,visual-studio,resharper,teamcity

You can have as many unit test projects for the same solution as you need. If you want to go with separate project (i.e. your build system only setup to run test from separate project) I'd have new project sharing tests from old one - create new project and add...

MSpec Json.NET deserialization test fails in ReSharper but passes in NCrunch

c#,json.net,resharper,mspec,ncrunch

Clearly there is an odd runtime effect going on due to some subtle difference in behaviour between NCrunch and ReSharper. The failure is definitely telling you something is wrong and you shouldn't dismiss it as a bug in either ReSharper or NCrunch. When I step through the MSpec test in...

Inconsistency in Resharper's qunit test runner

resharper,qunit

I'm not sure if this is exactly how you want this to work, but I wanted to run a newer version of QUnit than the one that comes bundled with R#. The simplest solution I had was to include QUnit-1.17.1 into my project, and in the top of my JavaScript...

Disable “click to navigate” icons in Resharper

resharper

They can't be disabled, I'm afraid. If you want to, you can log this as a feature request at https://youtrack.jetbrains.com

ReSharper 9 Adding menu item action not working

c#,nuget,resharper,nuget-package,resharper-9.0

The way actions are registered has changed in ReSharper 9. It's no longer done with actions.xml, but with interfaces on your action class. For example, to add an action to the ReSharper → Tools menu, you would do: [Action(ActionId, Id = 1)] public class AboutAction : IExecutableAction, IInsertLast<ToolsMenu> { public...

Resharper Search with pattern method call

c#,replace,resharper

You need to make sure that you use the correct placeholder type when you set up the search. Here, result should be an Identifier Placeholder and usp_IsDbObjectsOK should be an Expression Placeholder. When I do that, the replace works as you'd expect....

How to run nunit tests with asp.net 5 projects, espically with ReSharper?

nunit,resharper,asp.net-5

DNX tests aren't currently supported by ReSharper. It's a whole new execution model, and hasn't yet been implemented for ReSharper. I'd expect to see support as DNX and asp.net stabilise and near release. Also, I don't believe nunit itself supports running as a DNX test runner - the xunit team...

Resharper: code issues only in cs files

c#,.net,visual-studio,model-view-controller,resharper

See this May be this will help you....

How to avoid 'Method is never used' message?

c#,visual-studio-2013,resharper,static-analysis,resharper-9.1

This warning will only be displayed when the Solution-Wide Analysis is enabled. The warning is about the usage (in this case e.g. a call) of the interface method. The following example should demonstrate it (note the var vs. interface as local variable type). var instance = new AImplementator(); // Does...

Resharper 8: Use ContractAnnotationAttribute for validation method

c#,resharper

I don't think you're going to get anything to help here. The ContractAnnotation attribute can be used to mark a method as an "assertion" method, meaning the whole point of the method is to assert something and throw if it fails. This can help with analysis, such as removing the...

ReSharper Documentation Tags Formatting One Per Line

c#,visual-studio-2012,resharper

Turns out I was looking in all the wrong places. I was attempting to fix the comments layout by using the refactoring settings. The settings to format the XML comments at creation time are in the StyleCop settings here: ...

resharper is not ignoring tests marked with Category Attribute in XUnit

resharper,xunit.net

xunit doesn't have a Category attribute, so the resharper runner won't recognise that. As for the trait attribute, you need to provide a value, then filter for something in the format key[value]. E.g. if you want to use [Trait("Owner", "Matt")], you would filter for a category of Owner[Matt]. The trait...

Is this sharper than the Resharper Robots?

c#,resharper,null-check

This: private static Subdepartment GetSubdepartmentForXMLElement(XElement subdept) { return new Subdepartment { Id = Convert.ToInt32(xElement.Value), AccountId = Convert.ToDouble(element.Value), Name = el.Value }; } ... does not even compile. xElement, element, and el are not declared. However, resharper should not complain about this: private static Subdepartment GetSubdepartmentForXmlElement(XElement subdept) { if (subdept ==...

Is it safe to use field inside and outside synchronized block?

c#,.net,multithreading,resharper

Problem scenario : We've had some instances of duplicate emails being sent, so I'm implementing a lock to prevent multiple threads from sending emails simultaneously. So you are using Lock() to prevent this happening, that means you need to synchronize threads accessing a common resource which in this case _mailQueueRepository...

Increase recent clipboard pastes in Resharper?

resharper,resharper-8.2

Nope, sorry. It's a hard coded limit. If you have that many entries, you might want to store them as some kind of snippet, either by dragging the text snippet to Visual Studio's Toolbox window, or by creating a ReSharper Live Template in the Templates Explorer.

Search for methods/properties of an inherited class used by inheritor

c#,.net,visual-studio-2013,resharper

In base class delete all virtual keywords In inherited class change all override methods to new (hide the base class methods) And than use Find all references on a base class That will probably work...

ReSharper 9: Microsoft Reference Source, Instead of Decompiled .cs Files

c#,visual-studio-2013,resharper,decompiler,reference-source

ReSharper will try to download a .pdb file for the assembly that's defining the type you're trying to view. But Microsoft don't have all .pdb files for all specific versions of all assemblies in the framework available to download - and if the .pdb isn't available, ReSharper falls back to...

How to use relative paths in ReSharper DotSettings layers

resharper

See the corresponding issue in JetBrains' tracker: RSRP-339002. Don't remove anything: ReSharper tries to load the file from both paths, so you should be fine. I've been using a similar setup (a shared and versioned DotSettings between multiple solutions) for the past two years without problems. You can't remove the...

Mising code snipper testc after R# install

.net,visual-studio,testing,resharper,code-snippets

ReSharper doesn't show Visual Studio snippets in code completion, but they're still there. Type testc and hit tab. It should expand the snippet.

Get the results of Code inspections

.net,cmd,resharper,static-code-analysis

You need to use the /o= command line parameter to specify where the output file is written. By default, it goes to the %TEMP% folder. This output file is an xml file that you can then analyse or convert with a stylesheet. More details on the command line options here.

Resharper Formatting Ternary Operator

resharper

Try enabling ReSharper | Options | Code Editing | C# | Formatting Style | Other | Align Multiline Constructs | Expression

Does Resharper have a “search everywhere”?

visual-studio,visual-studio-2012,intellij-idea,resharper

Yes. The feature is integrated with the "Context Actions" popup; press Alt-Enter and start typing the name of any action you need. ...

Calling CancellationTokenSource.Cancel() within a task does not set Task.IsCanceled to true

c#,task-parallel-library,resharper,cancellationtokensource

Don't use the cancellation token when waiting on the Task. It's causing Wait to throw and move on to the assert before the task's status gets set. The two things are happening in parallel, so it's actually a race condition as to whether or not it happens, hence the issues...

Resharper support for NUnit 3.0 alpha

c#,.net,nunit,resharper

Currently, this support is not yet available. The package information for NUnit 3.0.0.0-alpha-4(Pre-release) mentions: This package includes the NUnit 3.0 framework assembly, which is referenced by your tests. You will need to install version 3.0 of the nunit-console program or a third-party runner that supports NUnit 3.0 in order to...

ReSharper: Null check is always false warning

c#,generics,resharper

It's occurring because the class implements IDictionary<TKey, TValue>; the warning disappears if you (temporarily) delete the interface portion of the class signature. Since the "key" in the standard System.Collections.Generic.Dictionary class can never be null (it throws an ArgumentNullException), I'd say ReSharper is making an incorrect assumption. Testing the behavior: I...

ReSharper 9.0 styling: BSD indention is slightly off

c#,visual-studio-2013,resharper,resharper-9.0

The problem originated from a different setting: Options > Code Editing > C# > Formatting Style > Other Continuous line indent multiplier was 0, should've been 1....

SearchDomainFactory.Instance is obsolete: 'Inject me!' ( Can't find out how to create instance)

resharper,resharper-plugins,resharper-sdk

ReSharper has its own IoC container, which is responsible for creating instances of classes, and "injecting" dependencies as constructor parameters. Classes marked with attributes such as [ShellComponent] or [SolutionComponent] are handled by the container, created when the application starts or a solution is loaded, respectively. Dependencies should be injected as...

Resharper go to file from class

visual-studio,ide,resharper,jetbrains

Use Shift+Alt+L. This corresponds to the menu option Resharper, Tools, Locate in Solution Explorer. This is what I use in Resharper 7....

Resharper sort properties, fields by name on file saving

c#,.net,visual-studio,resharper,codemaid

I found nuget package which allow to reformat code according to re# rules on file saving. Below is link to it https://visualstudiogallery.msdn.microsoft.com/b5445a42-8c98-43cc-a4c5-7f7496f647c6...

resharper test runner - how to execute by category?

c#,unit-testing,visual-studio-2012,resharper

Are the long running tests actually running? I know it seems like a silly question, but if both long and short running tests share a test fixture, it might look like they're running, as in the screenshot you posted, but it's only the shared fixture that's run, not the actual...

Resharper “join declaration and assignment” don't convert to “var”

c#,refactoring,resharper

To get "int" here instead of "var", you need to select "Use explicit type" in ReSharper | Options | Code Editing | C# | Code Style | var usage in declaration.

Messed up color scheme in ReSharper C++

c++,visual-studio-2013,colors,resharper,resharper-c++

The colour scheme is not really messed up, Resharper has just added a few more colours, this is probably due to the Code Inspections (for C# anyway, I assume it is similar for C++). To disable this, go to: Resharper->Options...->Code Inspection->Settings and uncheck the 'Color identifiers' EDIT: The above was...

Keyword var performance for compilation

c#,visual-studio,compilation,resharper,var

In my experience, any difference is negligible to unobservable. I can find no difference whatsoever, even on larger projects. Whatever difference var makes is statistically insignificant, and lost amid the rest of the compilation work.

How can I integrate ReSharper's Dotsettings File in SonarQube?

c#,resharper,sonarqube,bamboo,stylecop

You cannot use an existing .DotSettings file with SonarQube's R# plugin at the moment. This feature however will be added in the upcoming release of the R# plugin, refer to http://jira.sonarsource.com/browse/SONARRSHPR-15 for details. Note: The re-use reports mode was already supported in the past (with the C# plugin version 2.x),...

Variables in preprocessor IFs not found ReSharper

c#,resharper

This is just Resharper trying to be helpful, (Originally said comments should be around the #IF block, this is incorrect) If you surround your variable declaration with the following comments then it will tell Resharper to exclude this test during it's analysis of this code block. // ReSharper disable UnusedVariable.Compiler...

find which types from given dll are used in my solution

c#,.net,resharper

References are always used within a project. To find the types used from that assembly just open the context menu of that referenced assembly under References of your project and select Find Code Dependent on Module If you want to see which types are used, you can group them in...

Why does the ReSharper Find Usages command search resx files?

resharper

The answer to this is all due to ReSharper's underlying architecture. When processing files, ReSharper will build an abstract syntax tree, and each node in the tree can have one or more references to an element in the semantic model. In other words, the Foo in the expression new Foo(42)...

I cannot debug two projects at once - one with Resharper NUnit tests

debugging,visual-studio-2013,nunit,resharper

It appears that the ability to debug unit tests while other projects are running is a feature that was introduced in Resharper 9.x. The other developer was using a trial of it, it turns out. Now that he's reverted back to 8.2.2, he is seeing the same thing that I...

How ReSharper chooses whether to show library types in hierarchies inspector?

c#,types,resharper,hierarchy,inspect

Not sure under what circumstances you're getting ReSharper to show types, but the rule of thumb is that the default search scope for Find Usages or Go To Derived Type, etc. is solution scope. So ReSharper will only show usages and derived types that are defined in the current solution....

Different Behavior when running nunit tests from project and from solution

entity-framework,nunit,resharper

Try selecting "Use separate AppDomain for each assembly with tests" in ReSharper → Options → Unit Testing. This is an optimisation ReSharper makes that reuses AppDomains (they're expensive to set up), but has the side effect that only one app.config can be loaded, and it might be the wrong one.

Resharper - Disable once with comment - all instances in line

resharper

You set Resharper to Disable and Enable more than one time. (Read the next line in the context menu or somewhere else close by.)

cannot find inspectCode.exe in Comand line tools for resharper

resharper,sonarqube,command-line-tool

Wrong archive is published over there. Please, wait a day or two - it will be updated. It will contain inspectCode.exe file. Update: Please, download it by this link http://download.jetbrains.com/resharper/ReSharperCommandLineTools01Update1.zip...

Visual Studio Unit Test Code Base is different from machine to machine

c#,.net,unit-testing,visual-studio-2012,resharper

Got it to work: Updated VS2012 to Update 4 Now I have code executing from Bin\Debug but I can't start Unit Tests using Resharper - only VS Test Utilities Upgraded Resharper to v7.1.3 At this point Resharper started to work but I started to get An unhandled exception of type...

How do I tell Resharper to look in a custom location for Partial views?

asp.net-mvc,razor,resharper

I have Resharper 8.2 installed. I would register custom ViewEngine in global.asax and it works fine. protected void Application_Start() { //register custom ViewEngine ViewEngines.Engines.Clear(); ViewEngines.Engines.Add(new MyCustonViewEngine()); AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); } and here is code snip for...

ReSharper cannot resolve collection type in comments

c#,resharper

There's a particular syntax within an XML comment for referring to generics: /// The <see cref="Dictionary{TKey,TValue}"/> ...

Nuget-deployed C# files excluded from Resharper analysis

c#,nuget,resharper

ReSharper excludes source code that has been delivered as part of a NuGet package from analysis - it treats it as third party code that you did not write and do not want to maintain. E.g. it won't show any inspection results for files such as jquery.js or angular.js -...

CSS Intellisense for files not in solution

css,visual-studio-2013,resharper,web-essentials,resharper-8.0

If you are using gulp or grunt for your build you might try something like this: http://www.davepaquette.com/archive/2015/02/09/ensuring-intellisense-for-bower-packages-in-visual-studio-2013.aspx?utm_source=rss&utm_medium=rss&utm_campaign=ensuring-intellisense-for-bower-packages-in-visual-studio-2013

Resharper Intellisense Auto Import

c#,resharper

Jetbrains support: We fixed such issue in ReSharper 9.1 branch and the fix will be available after ReSharper 9.1 release. Unfortunately, we do not have exact date of the release....

In ReSharper 9, how to generate autoproperties from missing members?

c#,visual-studio-2013,resharper,resharper-9.0

It seems there's some odd options at work here that impact each other. Do this: Navigate inside the class (ie. not on the squigglies on the class or interface), and hit Alt+Insert, for generate code, then select "Missing Members". In the dialog that pops up, only change an option at...

ReSharper type member layout ordering and [DataMember] attributes

c#,resharper

As far as I can see, ReSharper's default is to not reorder properties, so the example you give doesn't get reordered. However, it does sort fields by name, which might be what you're encountering. Fortunately, it is possible to edit the order using the Options dialog. But, as far as...

How to fix a lot of unit tests when results are changed

c#,unit-testing,nunit,resharper

Actually there is no solution for quick-fix expected values. If your changes break a lot of integration tests, you have to manually correct all of tests. The only hint is to minimize distance between copy-paste operations of expected values....

ReSharper's is not working with local paths

javascript,unit-testing,jasmine,resharper,qunit

It's fixed in ReSharper 9.1.1!

What is the best way to restrict method access at compile time?

c#,.net,resharper,roslyn

Well color me surprised. PostSharp lets you do exactly what you're looking for. In a nutshell, you'd use the ComponentInternalAttribute to control visibility of a type: public class Item { [ComponentInternal(typeof(Manager))] public Item(...) { } ... } According to their documentation linked above, attempting to invoke Item's constructor outside of...

Exporting Resharper Inspection Results for Incoming Calls?

visual-studio,resharper

It looks like the export issue is a bug. I've reported it here - RSRP-440597. You can log on, vote and track it. The expand all behaviour is a little unintuitive. It's actually expanding all items that have previously been expanded, rather than expanding anything that hasn't yet been searched...

Add all Visual Studio unit tests with a specific TestCategory to a new Resharper testsession

visual-studio-2013,resharper,resharper-9.0

It is possible but is a multi-step process: Create a session that includes all of your tests (or at least all tests in the target category) In that session, go to Options -> Group by -> Categories Right-click the category in the results pane and select "Create New Session" ...

ReSharper 9 “File Layout / Type Member Layout” without regions

c#,resharper

Got it. You have to use the designer and drag the region explicitely into your area like this: ...

Localizable string warning R#

c#,winforms,resharper,localizable.strings

Check the answer to this question for the solution. Your R# setting is set to ignore verbatim strings and still report them as localizable. This means that R# wants you to move the "magic" string to a resource file that helps with language localization. This is so that if you...

How to specify which format resharper autocompletes arrays?

c#,resharper

Here is the answer provided by Jetbrains support: "I believe there's no way to configure this behavior. Though, you may create a custom Live Template for these needs. You may read more about Live Templates here: https://www.jetbrains.com/resharper/help/Templates__Applying_Templates__Creating_Source_Code_Using_Live_Templates.html?search=Live%20Templates Hope it helps. Thanks. Senior Support Engineer JetBrains http://www.jetbrains.com "Develop with pleasure!"...

How I can disable not relevant xaml warning

.net,wpf,xaml,resharper

I guess whatever you are doing happens in the Constructor of your ViewModelLocator, so you should either move this code somewhere else or (since you are probably using MVVM Light) you can just check if you are in design mode and just return from the constructor or don't do the...

What does this red square icon mean in Visual Studio 2013 Solution Explorer?

visual-studio-2013,resharper,ankhsvn

It's likely from Subversion, saying that you have changes in the file

How could i let Resharper or Intellisense know that a method allwayse throws exception?

c#,exception,resharper,intellisense

There's two issues here. First, you can give ReSharper hints to code analysis, and I'll show you how below. The problem here, however, is not ReSharper, but the compiler. The compiler will not be persuaded by these hints. The method you showed: public int AnotherMethod() { // some stuff MyMethod();...

How can I check XElements for null vals in a way that Resharper will accept?

c#,resharper,nullreferenceexception,xelement

You can use explicit cast instead of accessing the Value property return new ItemGroup { Id = (int)itemGroup.Element("Id"), item_group_id = (string)itemGroup.Element("item_group_id"), name = (string)itemGroup.Element("name") }; ...

ToString and string concatenation - unexpected behavior

c#,resharper

This can happen if you have provided an implicit operator converting your class to a string, for instance: public class Foo { public string Key { get; set; } public string Value { get; set; } public static implicit operator string(Foo foo) { return foo == null ? string.Empty :...

How can I record a “(” in a macro in vsVim?

visual-studio,resharper,vsvim

The most likely issue here is that R# is eating the ( keystroke. This means it never makes it to VsVim and hence doesn't get recorded as part of the macro. The following issue tracks cleaning this up. It would include fixes for R# as well. https://github.com/jaredpar/VsVim/issues/1393 ...

Resharper extend selection and shrink selection

visual-studio-2013,resharper

The extend selection command is ReSharper.ReSharper_SelectEmbracingConstruct, and the shrink selection is ReSharper.ReSharper_ShrinkSelection (Yay consistency!) You can remap them in the Tools → Options → Keyboard dialog. Or, you can reset keyboard shortcuts to default ReSharper settings by going to Tools → Options → Keyboard and hitting reset, then going to...

ReSharper and NUnit's multiple domains

nunit,resharper

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 assemblies....

Use ReSharper to Change an indexer to Getter/Setter methods

c#,resharper

Yes. With your pointer on the this in the method signature, go to the menu in Resharper -> Refactor -> Convert -> Indexer To Method... The reverse is also possible, but you'll have to do it for both the GetStuff and SetStuff methods and select the corresponding Method to Indexer...

Fix inaccurate reported error with ReSharper 9.0

resharper,resharper-9.0

First analysis often gives false positive results, so it will be removed in upcoming 9.1 version. Second issue is already logged in our tracker https://youtrack.jetbrains.com/issue/RSRP-429055. Over there workaround is provided. In short - use html entities. <input class="last" type="button" id="btnLast" onclick="last()" value="&gt;&gt;" />...

IntelliSense: aria-valuemax and data-ng-style aaaargh?

visual-studio-2013,resharper,intellisense

This is the AngularJS plugin for ReSharper. The latest version is a bit more sane with respect to item ordering and will choose style over data-hg-style. However, most of this goodness comes from ReSharper itself, and the latest version of the plugin requires ReSharper 9.1.

How to change resharper 'usages window' selection hightlight color?

visual-studio-2010,resharper

Try changing the following color Control Panel | Personalization | Window Color | "Item" dropdown | "Selected Item"

NUnit Gets Different Hash Code Values from ReSharper vs Visual Studio 2013

c#,unit-testing,visual-studio-2013,resharper

You're probably using the 32-bit CLR in one test runner and the 64-bit CLR in another. The implementation of string.GetHashCode differs between the two. You should not depend on them being consistent between runs - they only have to be consistent within a single process. (It would be entirely reasonable...

“Variable 'X' can be made constant”, what does 'constant' mean?

typescript,resharper,ecmascript-6

It's nothing complicated. It's always better to use const over let (and definitely var), since const makes it a bit easier for other coders, or you when you come back to the same code in the future, to understand what is going on, since you only have to look at...

Using custom extension (/x) in resharper 9.0 command line inspection

resharper,command-line-tool,code-inspection,resharper-9.0

I am afraid, this functionality was lost in 9.0 release (really both ways to use plugins in CLT are broken).

Angularjs - Resharper intellisense broken with TypeScript?

angularjs,typescript,resharper,intellisense,definitelytyped

I turned off the TS support in R# and intellisense seems to work properly. So, I would assume this is the Resharper issue Yes. They need to update for v1.4 of typescript. You can use an older angular.d.ts till then : https://github.com/borisyankov/DefinitelyTyped/blob/1.3.0/angularjs/angular.d.ts...