Tag | Resharper Posts

I find it important to have a common development environment in our team. This allows us to easily switch seats during the sprints. ReSharper has a lot of customizable features, and we just figured out how to share these. Code conventions If your team agrees to name all local variables with a prefix of "local" (which I wouldn't advise, but hey, the team decides), you can set that in Re#. This will not enforce anything, it will just provide you with default choices. The result will look like this: ...
Ok, now I'm certain the creationists and intelligent design guys are dead wrong. Darwin was right all along (or maybe it's the pastafarians, but that's another topic). I experienced the living proof today that mankind has just spawned a new superior race that is going to dominate us all: The Boodhoo! The Boodhoo lives amongst us. He look like us. Breathes and eats like us. But he's different. The astute observer will be able to recognize him based on the following list of observations: He is always ...
If you use resharper with Visual Studio 2008, you may have noticed that it keeps suggesting you use implicitly typed local variable declaration i.e. the var keyword. To me, it is a bit annoying. You can actually find why people think it should exist in the first place:http://resharper.blog... There are some valid points, but I am not convinced. I think it is less readable in most of the case. I can’t agree with Ilya that it induces better naming ...
I've posted several new ReSharper tips of the Day to to Fooberry.com. One of the most interesting ones in my opinion is the ability for ReSharper to generate the overriden Equals method. Read more here at Fooberry.com.
Every time I get to a point where I need to commit the code I've been working on (a.k.a 'The Check In Dance'), I typically ALT+Tab over to the explorer window where my source working directory is located. From here I execute our build.bat file that runs the developer build process that compiles the code and runs all the unit and integration tests locally before committing my changes. I'd rather stay in Visual Studio to do this so I Googled for a solution and of course found that some smart person ...
Be very careful when allowing Resharper to convert properties to auto-properties. In some cases it will re-initialize fields that were already initialized earlier on in the constructor. http://www.jetbrains.net/ji... ...
Always use Nullables for dates at the least. Trust me on this. I dogged Nullables for the longest time because I thought they were buggy, then I realized today when testing that I was using them wrong. Nullables allow you to actually have null values, which for dates is arguably a must. Why? Keep reading... Tip: Never call Nullable.Value. The nullable item will error out if it is a null value. This is where I was going wrong and thought they were buggy. Just call the nullable item and it will return ...

Some classes like StringBuilder build in the string.Format functionality. ReSharper knows this and helps you out. It’ll recognize you should probably be using a format string.

Read more at Fooberry.com.

Some classes like StringBuilder build in the string.Format functionality. ReSharper knows this and helps you out. It’ll recognize you should probably be using a format string.

Read more at Fooberry.com.

Today’s ReSharper Tip of the Day is a guest posting from Josh Buedel, It is a great tip that extends ReSharper’s use into the CSS and HTML space. Resharper templates come in two flavors: Live Templates which are invoked by typing keyword and pressing tab, and Surround With Templates, which are invoked against the current selection. .... Read more at Fooberry.com ...

 

Everyone uses, or at least knows about the member dropdown in Visual Studio. Did you know ReSharper can take you there faster? Read more at Fooberry.

I just installed Resharper 4 (www.jetbrains.com) on my dev machine, and aside from the usual hints etc, there are some new ones, most notably the way it asks to insert a const string locally, for example: private void ShowMessage() { string msg = "Hello!!"; Console.WriteLine( msg ); } ReSharper suggests should be replaced with: private void ShowMessage() { const string msg = "Hello!!"; Console.WriteLine( msg ); } Now, I've never done that in my code in the past, but, presumably there is some performance ...
I've started a new blog to be the home of my ReSharper tips of the day, Fooberry.com. Hopefully it'll draw as much attention as this blog has, although I am afraid most of the views to the page come through the GeeksWithBlogs.net main feed.

I hope everyone visits and enjoys Fooberry.com, where sweetness has no context.
When you go to use a type that is not added in the references, you can type out the complete name. And ReSharper will know it needs to add, in this case, System to your using statements. Press ALT + Enter and it will add it for you. If the name is ambiguous it will ask which one you want. If you don’t even have the assembly referenced it will ask you to add that too. WARNING: This will make you lazy with remembering which assemblies and namespaces are home to which classes ...
In reference to my previous post about collectively running unit tests, I thought I would offer this ReSharper tip. ReSharper’s unit test runner is just plain awesome. Why MSTests don’t work like that by default astounds me…and is enough reason for me not to use them (although there are several more). One option you have for aggregating which tests you want to run in a single session is to right click on the folder that contains their source, right click and either Run or Debug them. I’m looking ...
Maybe I’m just a lazy boy, but sometimes I forget the return type of my methods. I can let ReSharper change the type of my local variable to match my return type ...
Here is another cool one….at least to me. In my test classes I’ve been trying to fake out my dependencies instead of mock them…just for a change and most of the time I don’t really want to assert how the class used the dependency, just that it gives me the correct result. I create nested private classes using ReSharper. It puts it at the bottom of my current class which is fine. However, all that is noise to me for the most part, so I moved them to a partial class. I have MyClassTests and MyClassFakes, ...
Recently I’ve been able to extend my unit test code coverage as I’ve been introducing more features into our code base. I know this is something that should always be done, but for whatever reason, that’s not the case. What I’ve come to notice is our current method of organizing our unit test makes adding new features and test for new features awkward. Currently our unit tests align perfectly with the class they test. So for example, if we have a class: namespace MyCompany.Domain{ public class Foo{} ...
If you find naming your variables mundane, press CTRL+Space after you type the type name and ReSharper will suggest a couple for you. Want something a little better? If you start typing, it will tack on the suggestion to the end of what you started ...
I love Resharper. If you have not tried it, you are missing a lot of cool functionality and in my opinion it is a must have for serious developers. JetBrains, the company that makes Resharper, has releases the beta version of Resharper for Visual Studio 2008. While the old version works with 08, there are many small issues that make it difficult to use. Check it out when you get a chance ...
Avoid Much Talk I wrote about Resharper 4 performance improvements in an earlier blog post today showing my VS Color Scheme including use of R# nightly builds. My friend Mohamed Tayseer pointed me out that Resharper 4 BETA was released yesterday. If you already know Resharper, skip the blah blah blah talk and get to the download. Resharper, AKA R#, Who ??? Resharper used to be a must-have add-in for Visual Studio. It completes the features existing in Visual Studio like intellisense (not just smarter ...
I blogged my old Visual Studio settings before for Visual Studio 2005, using a dark color theme and optimizing it for Resharper features like Resharper colorings and "Current Line Highlight". Today I'm sharing with you my settings for VS 2008. Things have changed a bit since the first time, so, you'll find the layout different and colors as well, although still dark as well. The one thing to notice is using "Lucida Console" font instead of the popular "Consolas". Also, if things look a bit small ...
I am hooked on ReSharper, and when I started using VS 2008 with ReSharper, I was feeling the pain with version 3.1. I would go back and forth between turning it off so I could access my Linq methods and avoid having ReSharper reformat my code into a nice mess, and turning it on so I could have it fix my usings and reformat my code nicely. I have been using ReSharper 4.0 pre-release version for a few weeks now, and it's working out pretty good. I only have to turn it off once in a while now. The lambda ...
UPDATE: More posts on the subject xUnit.net RC3 Just Released Relooking at xUnit.net RC2 UPDATE: xUnit.NET RC2 New Drop includes ASP.NET MVC support and better GUI runner. Details here. UPDATE: Added Static Methods mention and F# - Thanks to DevHawk! I've been a big fan of such testing frameworks as NUnit and MbUnit, but recently I've found myself getting pulled more towards xUnit.net at least to play around with for any of my code samples that I write for this blog and on my own time. I'm not really ...
Stefan Lieser has posted a great preview of a plugin he's working on for Resharper for working with NHibernate mapping files. I've installed it and like it alot already. Anything that makes it easer to work with XML is a good thing in my book! Features he has implemented so far are: Name and type of mapped class is verified Id name and type is verified Property names and types are verified (not the access attribute!) many-to-one and one-to-one names and types are verified Component names and types ...
A recent announcement was made on the altdotnet mailing list that made me jump for joy today. Ilya Ryzhenkov and the great folks at JetBrains have published the nightly builds for Resharper 4.0. The download for this can be found here and you might want to read the release notes here. It's important to note that the LINQ syntax is still not supported yet. As with any product in nightly builds, please use with caution, but download it and play with it today ...
Oh dear, what a long time since my last blog - a hectic pre Christmas projects, a three week Christmas and another major software development in January have really had an effect. Fortunately I'm getting back on track with new development and once I'm back from a holiday in the Caribbean I'm hoping to get some serious research into new technologies including the MVC framework from Microsoft and getting my CI Factory installations up to date. As part of this new push, I looked into finally taking ...
I knew it's there all over the web, and people are still asking, so, let's go through it together! Most simple Visual Studio 2005 add-ins could actually work with Visual Studio 2008. I'm not talking about huge add-ins like Resharper here, but most of the small utilities we find online. If you really want to keep using your add-in, and it doesn't provide a VS 2008 version yet, and you didn't have VS 2005 installed on the machine when you installed VS 2008 (as it tries to migrate the add-in when you ...
Inspired by Scott Hanselman and his relation from Visual Studio 2008 InstallFest in Portland Polish user groups started the series of events in Poland. First such event was organized by Szymon Kobalczyk in Kraków and you can read about it on his blog. I was one of the organizers of the event so I cannot tell I liked it because I loved it. It was a huge fun for me. I believe it was a great success. At the moment there was a second InstallFest in Wroclaw. I was there, and I think it was also well organized. ...
Very recently on the CLI_DEV (formerly ALTNETCONF) mailing list, Joe Ocampo asked whether the standard saying, "Code Comments are an apology for bad design" holds in regards to documenting your non-public API. I believe that question arose once before and usually a flame war erupts of some sort. I found this button sums up my feelings best! But, anyhow, it's a real valid question and believe it or not, people have quite strong opinions on the matter. With tools like Resharper and other refactoring ...
Update: Adding Visual Studio Integration discussion Update: Stay tuned for additional posts in this series as things permit Well, this is my last post in the series to wrap things up. This will be updated as things come to mind, as they always do in a series like this. There may have been unclear things that I will attempt to explain a little further, plus clarify and explore new things. Let's get caught up from the series: Part 1: Spec# introduction Part 2: Method Contracts (Preconditions/Postconditions) ...
It looks like only reasons I had doubts about using CodeRush over Resharper have disappeared today. CodeRush 3.0 ships with two new major features. The first is the new code navigation engine that allows you to easily traverse through method overloads, navigate between base and child classes, jump to the previous or next reference to a member, and much more. Another important enhancement in this release is the new code generation mechanism. You can now first write code using undeclared class and ...
I've been playing around with mock objects using Rhino.Mocks for the last few months, but today was the first time that I had an unfettered coding win and became a true convert. I was introduced to NUnit about five years ago from a co-worker (thanks Dewayne) and gradually became a true believer. Unfortunately, I was a late-bloomer in the area of mocking, so by the time I finished my last big project I had left a suite of about 500 database driven tests that took almost 2 hours to run and were a maintenance ...
You will now find that Microsoft has released Visual Studio 2008 on MSDN for certain subscribers. It will be there soon for everyone, but if you are a Volume User on MSDN, then you might not find it there yet (as of yesterday). I was pretty excited for this release. Once installed, I had to also install JetBrain's ReSharper and it requires you to do a command line install. Once the .msi for ReSharper is on your machine, you will have to use the following command to install it for VS2008. msiexec ...
R# is a tool that I use and absolutely love. I recommend this for anyone who uses Visual Studio and programs in C# or VB.NET. Those that use R#, we see the benefits that it brings and the absolute productivity boost that you get using it. You immediately think, why wasn't this stuff in here to begin with?! It brings about a great set of refactoring tools, and it lets you know when you open a set of code if it is going to compile or not. You can find usages in a file (it will put color codes as to ...
I was working with someone who doesn't have ReSharper today and I noticed for the first time that I have developed some feature addictions because I actually winced when I watched him fully type out a property and then manually do an "extract method" refactoring. This surprised me since I have only really been consistently using ReSharper for the last month and am still far from my goal of becoming a ReSharper Jedi. Nevertheless, the dozen or so keystrokes that I have mastered and consistently use ...
Ayende started a thread in the ALT.NET newsgroup asking participants what practices they deemed absolutely necessary on a project. In other words, if you were to start in a shop that had none of the current "best practices" in place, which ones would you spend your political capital on trying to get into place first. If I only had enough time, money, and political capital to accomplish seven things, I would choose the following: Test Driven Development: This is the one practice that I can't really ...
I just took this online typing test and found out that I type 73 words a minute with a 97.5 % accuracy rate, which I assume is average at best. It would be nice to be able to type faster, but I'm not going to waste any cycles trying to improve at this point because I think that typing speed means very little in the overall scheme of developer productivity. Someone who pecks away 20 words a minute but has deep technical knowledge, sound design skills, a logical thought process, and a mastery of productivity ...
I used Resharper's unit-test runner for the first time while spelunking WatiN last week and quickly became a fan. If unit-test runners were high school boys, here are a few reasons why the Resharper test runner would be dating the entire cheer leading squad while the NUnit test runner would have to bribe a distant, homely cousin in order to get a prom date. Integrated IDE experience: I think NUnit is good for deployment scenarios when you just want to load the test dll and verify the environment, ...
Participating in the open source community and becoming an avid code reader were two themes in my six month roadmap to becoming a better developer. I made progress in both of these areas in the last few days by downloading and exploring the source code for WatiN, an open source library that I have used recently for creating automated web tests. I still have quite a bit more exploring to do before I'll fully grok how WatiN works, but I thought I would share a few of the code reading techniques that ...
I've finally been bitten by the Resharper bug and now I want to be a Resharper Jedi when I grow up like Ilya Ryzhenkov on this video. According to the JetBrains .NET Tool Blog, a Resharper Jedi is someone who "can code hella fast with ReSharper and blow productivity levels off the chart". I haven't heard any claims about Resharper being able to help me Jedi-mind-trick my way out of traffic tickets, but there sure is a lot of reverent blogosphere speak about people like Ayende who can code at the ...
As noted to me from Scott Hanselman, Microsoft just released the CTP1 of the XML Schema Explorer. Seems that there are a lot of changes coming in the XML space for the .NET 3.5 release and the XML tools that are currently present in VS2005 will be no more as they are replaced by some new XML tools - the XML Schema Designer being one of them. Here is a screenshot of the new XML Schema Explorer. You can see from this screenshot that the schema is open on the left-hand side of the shot, while the schema ...
If I were to pick one tool to add to Visual Studio for my day-to-day coding, it would be ReSharper by JetBrains. I have been using the tool since version 2.0 and it is currently in version 3.0. It provides a ton of tips/corrections/advice as you type code. It provides better tooltips, better Intellisense, and extremely better refactoring than what you get out of the box with the default Visual Studio. For those of us out there that grab hold of the latest betas as soon as possible, you might be wondering ...
If you install Resharper 3.0.x and discover that Visual Studio 2008 Beta 2 hasn't recognised it, you need to run the install again with a few special command line arguments:

C:\WINDOWS\system32\msiexec.exe /i <full path to installer file>.msi VSVERSION=9.
Recently I was tagged by Russ on the Justice Gray challenge. Personal Something I have been attempting over the last few years is to be healthier. What does that mean? Well for my wife and I that means making healthier decisions when we eat. We find the good substitutes. Over the past two years we realize that is not enough. A healthy diet is a good step in the right direction, but you need that level of exercise to be the catalyst for a healthy lifestyle. -I think I want to run in something, probably ...
Recently I loaded up the 3.0 version of ReSharper and am very impressed. It made me realize how much I miss using that tool (since it's been years since I actually had a copy). They've came a long way since then and built a very nice suite of development productivity tools. So I had to give them some props on the blog (even though I represent no tool vendors at all I like sharing info on what I like as much as dissing the tools I don't) While teaching my .NET classes I mention tools like this every ...
I use a coding tool called ReSharper - and I was pleasantly surprised the other day when it pointed out a copy & paste bug that was waiting to explode. You see, copy and paste programming is so very easy to do - that we all do it. Even the best of us accidentally leave in duplicate code snippets from time to time. Why Cut & Paste is so bad There are two big reasons why this is an anti-pattern: If the code you cut and pasted has a bug in it (and it invariably will), what do you think are the ...
Oleg Stepanov, the project manager of ReSharper at JetBrains, announced today the availability of ReSharper EAP Build 258 which is also the first Release Candidate for ReSharper v2.0.1. This is the major bugfix we have been waiting for. It contains an approximate of 202 resolved issues according to the JIRA issue tracker. Download links:ReSharper2.0-VS2003-b... (24.8MB)ReSharper2.0-VS2005... (42.6MB)Buy a ReSharper 2.0 Commercial license Cross-posted from The .NET Aficionado ...
After using it for a couple of hours it looks stable and ready for use. Needless to say, it's nice to have it back in VS 2005 since the out-of-the-box refactoring support freezes the IDE 1/2 the time and takes at least a minute to complete the other 1/2 of the time. (I can finally get rid of all those extra C# using statements just taking up space!) When you install ReSharper 2.0, it forces you to install to VS 2005 hotfixes. I'm not sure what happened after installing these hotfixes, but my ASP.NET ...
Here is a brief list of tools that I use either for development or in general. I cannot survive without them (actually I can but you get the point): 1. JetBrains ReSharper - http://www.jetbrains.com/re... I cannot live without this tool. Honest. Buy it and prepare to be amazed how how much it will save you time. Upgrade to Visual Studio 2005 and realize how much you miss it. JetBrains is working on a new version for Visual Studio 2005. 2. CodeKeep - http://www.codekeep.net/add... A free ...