resharper

Is it a bad practice to explicitly declare a default field value?

Duplicate question to : Should I always/ever/never initialize object fields to default values? Environment: Visual Studio 2008 w/ Resharper 4.1 w/ 32bit .NET Framework 3.5 Resharper reports that Initializing field by default value is redundant Is it a bad practice to declare a default field value, explicitly? I find ex...

Visual Studio always on top when debugging

When I start debugging the project we are currently working on, the program window is not given proper focus in windows but is stacked behind the Visual Studio window. I don't think this problem occurs on any of my team members computers, so it looks like it's a problem on my system. Is there a setting in VS2008 for always on top or som...

Using a class's static member on a derived type?

Using Resharper 4.1, I have come across this interesting warning: "Access to a static member of a type via a derived type". Here is a code sample of where this occurs: class A { public static void SomethingStatic() { //[do that thing you do...] } } class B : A { } class SampleUsage { public static void Usage() { ...

Should I install ReSharper 4.5 beta, and using Beta VS plug-ins in general

I'm running ReSharper 4.1 and was wondering if anyone is using 4.5 beta? how stable is it, etc. Also how do people feel about using beta VS plug-ins in general on work systems. ...

Resharper and the C# Catch Clause

I'm new to Resharper and I'm trying to understand why it seems to suggest: catch (Exception) { } for catch { } and catch { } for catch (Exception) { } I'm baffled. ...

What are the business benefits of purchasing and utlizing resharper?

A co-worker and I are interested in getting resharper integrated into our development environments for the obvious technical benefits (refractoring, etc) but we need to justify to management on how it will help the business make money so that they can purchase it for us. What reasons would be on the top of the list to justify this purch...

Visual Studio 2008 SP1 has frozen fields

After installing SP1 for Visual Studio 2008, various fields are frozen e.g. in Find & Replace dialog I can't type anything, or in Tools->External Tools all fields(texboxes) are frozen, can't type anything. Same with ReSharper, can't type anyting into any of its dialogs... Do you know any workaround? If I restart visual studio it someti...

C#, XML-Doc: Refering to a generic type of a generic type in C# XML documentation?

Writing some xml documentation for a predicate helper class. But I can't figure out I can refer to an Expression<Func<T, bool>> without getting a syntax error. Is it even possible? I have tried this: <see cref="Expression{Func{T, bool}}"/> But I get a red squiggly line under {T, bool}}. This works though: <see cref="Expression{TDeleg...

VS: Automatic "ArgumentNull' check ?

It's often the case when I need to check a method's arguments for not being null, something like: public static bool operator <= (ApplicationVersion i_app1, ApplicationVersion i_app2) { if (i_app1 == null) throw new ArgumentNullException("i_app1"); if (i_app2 == null) throw new ArgumentNullException("i_app2"); [...] } ...

DevExpress Refactor Pro vs JetBrains ReSharper

In my department, we are currently using ReSharper 4.0 and deciding whether to upgrade to 4.5 upon its release next week. I personally am a huge fan of ReSharper however a number of my colleagues have pointed out that they have been using a plug in from DevExpress called Refactor Pro that performs similar functionality. http://www.devex...

Unable to use nMock GetProperty routine on a property of an inherited object...

I am getting this error when trying to set an expectation on an object I mocked that inherits from MembershipUser: ContactRepositoryTests.UpdateTest : FailedSystem.InvalidProgramException: JIT Compiler encountered an internal limitation. Server stack trace: at MockObjectType1.ToString() Exception rethrown at [0]: at System.Runtime....

Why doesn't the "Namespace Provider" property get saved within a project file for a given subdirectory?

Sub directories within VS2008 projects are mainly used to physically represent on disk the namespace structure for the project. Each folder has a Boolean property called “Namespace Provider”, which when set to True causes ReSharper to validate that the physical location of a given class corresponds to the logical namespace location. Occ...

Is it possible to only enable Agent Smith inspections in ReSharper?

We would like to have an intern go through our source files for spell checking and naming convention enforcement using the Agent Smith plug-in to ReSharper. It would be very nice to minimize the "noise" from ReSharper inspections by disabling all inspection options except those provided by the Agent Smith plug-in. Is this possible? ...

C#: 'default' keyword with Generics

I have written the following method to return a list of Unserializable classes (LINQ classes) from a list of Serializable classes (POCOs): List<UnSerializableEntity> ToListOfUnserializables(List<SerializableEntity> entityList) { var tempList = new List<UnSerializableEntity>(); entityList.ForEach(e => { if (e != null)...

ReSharper and var

I have ReSharper 4.5 and have found it invaluable so far but I have a concern; It seems to want to make every variable declaration implicit(var). As a relatively new developer how much should I trust ReSharper when it comes to this? Take the below code snippet from a method that Paints Tab Headers. TabPage currentTab = tabCaseNotes.Ta...

ReSharper Unit Test Runner: Support for Deployment Items

I like the Unit test runner in ReSharper 4.5, and would like to use it with my MSTest tests, but one thing annoys me: In some of our solutions, we have set up some Deployment Items in the .testrunconfig file. The ReSharper Unit Test runner does not seem to respect this, so I get errors when trying to run the unit tests from ReSharper. ...

Custom Brace formatting with Resharper

I'm using Resharper 4.5 and I need custom formatting of braces when writing an array or object initializer. Resharper supports some styles, closing of what I need is this: Gnu Style: int[] array = new int[] { 1, 2, 3 } but I need: int[] array = new int[...

How to fix resharper line wrapping indents

Resharper seems to have gone berserk and is wrapping lines without an indent, i.e. they are hugging the margin. This uglyness makes me rip my shirt off and go wild. else { gridView1.SetRowCellValue(gridView1.FocusedRowHandle, "PRIORITY", polcvgSetCollection.Max(p => p.PRIORITY) + 1); ...

How to use bdd naming style with Resharper 4.5?

I just upgraded to Resharper 4.5 and now see that all my BDDish test methods are marked as not conforming to the naming standard. My naming convention is like this: public void Something_ShouldHaveThisResult() Resharper doesn't like the underscore in the method. Is there a way to turn this off, just for test methods? I have a norma...

Debugging unit tests with resharper

Hi, I've just started using resharper and I found a very annoying thing about it. When debugging a unit test, I try to step-into (F11) a method, but visual studio complains that source code is not available. The problem is that resharper is wrapping method calls with its own classes. Of course I can put a braeakpoint further in my source...