Is there a way to auto-generate GetHashCode and Equals with ReSharper?

Yes, Resharper can do that. With cursor inside your type, open the “Generate code” menu (Alt+Ins depending on settings or Resharper -> Edit -> Generate Code), and select “Equality members”: This opens a window where you can select which members are used for equality, along with some options about the generated code (e.g. should your … Read more

Cannot edit checked out file (TFS) in Visual Studio 2013

I suspended Resharper and restarted Visual Studio 2013. Once I reopened it the problem was gone. Resuming Resharper caused the problem to emerge again. The solution is quite large so maybe that is it. Before putting Resharper into suspend mode I tried switching off code analysis thinking the workload is just too great, but that … Read more

Get correct indentation in Resharper for object and array initializers

I had the same issue with anonymous delegates. The fix for anonymous delegate formatting is here: I did finally find the way to fix this. The options for formatting anonymous methods are spread across two separate pages in ReSharper options: Braces Layout and Other. The “don’t indent a ridiculous amount” is on the Other page, … Read more

How to Restore Navigate To Dialog in Visual Studio After Resharper Installation

It sounds like you will need to remove the ReSharper keybinding and add the Visual Studio one again. Try the following: From Visual Studio 2010, go to Tools -> Options -> Environment -> Keyboard. In the textbox below “Show commands containing:” enter “gotorecent”. This should bring up one match and you can see the Ctrl+, … Read more

Any way to surround code block with Curly Braces {} in VS2008?

Here is a quick and dirty snippet to do just that. To Install: Save the code as SurroundWithBraces.snippet into “<my documents>\Visual Studio Version\Code Snippets\Visual C#\My Code Snippets” To use: Select block of text. Press Ctrl+K, Ctrl+S Chose My Code Snippets, braces <?xml version=”1.0″ encoding=”utf-8″ ?> <CodeSnippets xmlns=”http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet”> <CodeSnippet Format=”1.0.0″> <Header> <Title>braces</Title> <Shortcut>braces</Shortcut> <Description>Code snippet to … Read more

Referring to a generic type of a generic type in C# XML documentation?

There seems to be no way to refer to a generic of a generic in XML documentation, because actually, there’s no way to refer to a generic of any specific type. Lasse V Karlsen’s answer made it click for me: If you write <see cref=”IEnumerable{Int32}” />, the compiler just uses “Int32” as the type parameter … Read more

Running NUnit through Resharper 8 tests fail when crossing between projects due to AppDomain

The Workaround: Have you tried in Visual Studio going to ReSharper -> Options -> Tools -> Unit Testing Change the setting “Run up to 1 assemblies in parallel” to a higher number. I tried one for each test project. Max is number of cores, I think. Counterintuitive I know, but it worked for me and … Read more