resharper

Resharper intellisense confusion

Today I had something weird happen in my copy of Resharper 5. I have a class that looks like this: public class Foo { public string Username { get; private set; } public Foo (string userName) { Username = userName; } public void Bar() { DoWork(Username); } public void DoWork(string userName) { } } W...

Resharper code format linebreaks

Im trying to setup the code formatting in ReSharper. Limiting each line to a maximum count of characters, it seems to want to place casts on a separate line. Like so: string mystring = (string) MyStringConverter.convert(toconvert, typeof(string), null, null); I cant seem to be able to find the correct combination of settin...

Information about upgrading a Resharper plugin to v 5.0

I like the sound of the Exceptional plugin for resharper, but it says it currently only works with v4.5. Does anyone know what is involved with upgrading to 5.0 and how much things have changed, which bits will need to be looked at etc. I am quite tempted to upgrade it but would like some pointers before I start... ...

How to resolve Resharper's "unused property" warning on properties solely for Display/Value Members?

I have defined two properties "Name" and "ID" for an object which I use for the DisplayMember and ValueMember of a ComboBox with a BindingList datasource. I recently installed Resharper to evaluate it. Resharper is giving me warnings on the object that the two properties are unused. Sample code: BindingList<ClassSample> SampleList = n...

Converting 'foreach' to 'for' loop or vice versa with ReSharper possible?

Hi, Is it possible to mark a foreach loop code block and convert it to a for loop with ReSharper? Or with Visual Studio? Thanks! ...

ReSharper - var hint only for none basic type

I like the fact that ReSharper suggest me to use the var keyword. Instead, I would like to know if it is possible to ReSharper to only hints me when I use type that are not basic. Example :int myInt = ..., string myString = .... No hint here I prefer to use var on complex type like : var myHttpModule = ..., var userRepository = ... ...

How can I configure ReSharper's code cleanup on save?

I would love to configure Visual Studio/ReSharper to run "Code cleanup" whenever I save a file. A bonus would be to configure this only for C# files, as I sometimes find that the cleanup on ASP.NET files does not work without introducing errors. ...

How I can create my own code style format for Resharper 4.5?

How I can create my own code style format for Resharper 4.5?. And how i may to use it?. Thanks. ...

How to find a "method usage" all along a VS solution by specifying its parameters that are not NULL?

Hi, Is it possible in VS -maybe by using Resharper- to find a method's usage which has some of its parameters NOT set as NULL. Imagine I have this method: public string MyMethod(ParameterClass param1, ParameterClass param2 , ParameterClass param3,ParameterClass param4) { // Some processes return "Hello Pandora!"; } and I want to...

nUnit rowtest extension skips my tests

When I use the NUnitExtension.RowTest.dll it ignores my tests in Resharper/VS2008 and Gallio Icarus. Does anyone have a config that works? [RowTest] [Row(5, 6, 11)] public void Should_Do_RowTest(int a, int b, int expected) { Assert.AreEqual(a+b, expected); } ...

How to enable Resharper custom live template for JavaScript file

I've created some custom live templates with Reshaper 5.0 for C# files and they work fine. They also work for for JavaScript inside a .aspx file too. However, when I try to use my custom live template shortcut keystrokes inside a .js file, which is part of the Visual Studio 2010 solution, nothing (related to Resharper) shows up in the c...

Resharper custom search pattern to warn IDisposable objects

Since resharper still doesn't give out any warning regarding objects implementing IDisposable, I'd like to create some custom search patterns available in resharper 5.0. So far I have this: (And don't mind my replace comments in the patterns, I don't really care about it, I just want a clear warning in the code when dealing with dispos...

Resharper - how to get it to start again

Hi all I've just checked out a solution from Subversion and ReSharper is telling me it has 191 files with errors. In fact, it builds perfectly. Most of its issues appear to be 'Unknown symbol' ones, where it doesn't recognise namespaces or class names. Looking through the errors, at least it seems to be consistent about which ones it d...

ReSharper 5.0 VS CodeRush 10.1 - Specific Feature Comparison

I'm deciding between ReSharper 5.0 VS CodeRush 10.1. I've seen a lot of questions that target which one is better/faster than the other. For Example, ReSharper may be a little slower than CodeRush when working with large projects. What I am looking for is a list of which features are completely, outright missing in the opponent. An e...

command to write symbol as text (Resharper? VS2010?)

I was watching a screencast of someone using Resharper (on VS 2010 or 2008, not sure) where they were able to fill in a test name with a string literal: public class FooTest { public void "runs backgrounnd process until complete" and then some command transformed it to public class FooTest { public void runs_backgrounnd_proce...

accessing C# base class in iterator causes ReSharper warning

I have two classes, GenericList and SpecificList, where SpecificList inherits from GenericList. GenericList implements IEnumerable<GenericItem> and SpecificList implements IEnumerable<SpecificItem>. SpecificItem inherits from GenericItem. I have to implement GetEnumerator in both GenericList and SpecificList since they implement IEnum...

Can I exclude a file from being searched when doing refactoring with ReSharper?

Is there any way, when doing e.g. a rename class refactoring with ReSharper, I can exclude certain files or projects in the solution from being searched? I have one project in my solution that ReSharper takes forever to search through whenever I run a rename class, and I know that in 99% of the time, the refactoring does not affect this...

Run all open tests in Visual Studio

Is there an easy way to run all tests in open test classes in Visual Studio. I find that this is what I most often need to do. Mostly I use Resharpers or TestDriven.NET testrunners, and I cant find any easy way to do that in either testrunner. In Resharper it would be nice to have a "Add all open tests to session" feature, but after muc...

Protected Internal properties vs Protected properties and Resharper

I've just picked up Resharper and have been playing around converting fields to properties. I want these properties to be protected, but Resharper doesn't want to give me that option. Instead there is only a Protected Internal option. This has me thinking. Either there is a rule somewhere that properties should always be 'protected inter...

Ignore Resharper files in Team Foundation Server source control

How can I use Resharper without adding the Resharper generated files to the TFS server. Is there some sort of .ignore file/setting I can let the TFS maintainer modify. Or is it done client-side? We're using TFS 2008, but will be upgrading to TFS 2010 in the near future. ...