Geeks With Blogs

@michelgrootjans
  • michelgrootjans I scored 14 points in the FizzBuzz challenge on HackerRank https://t.co/8vicb8ANPq about 319 days ago
  • michelgrootjans @yreynhout we implemented elasticsearch on our last project. Works like a charm for rails apps. about 323 days ago
  • michelgrootjans Microsoft releases glasses - implementation looks great - https://t.co/RoC1s02irE about 326 days ago

News
Shelfari: Book reviews on your book blog

.net alternatives by Michel Grootjans

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:

codeStylechoice

These code conventions are simple to share. Just check "Shared across the team" under "Code style sharing", and you've got a common code style definition in Re#. This will create a file next to your Solution called "projectName.4.1.resharper". You will have to add this file to your source control.

CodeStyleSharing  settings shared_code_style  

Templates

Templates are another beast, and it took us quite a while to figure them out. In Re# you've got File Templates, Surround Templates and Live Templates. These can all be shared separately. For this, you first need to export a file containing the templates you like. This file needs to be source controlled. Then you need to mount (not import) the exported file explicitly.

First, you open your templates window. There, you export the template you want to share as a source controlled file by hitting the export export   button. You save this file and add it to source control.

Then, on all PC's in your team, you mount the file by hitting the mount import button. This will mount the source controlled template file. This mounted file appears in your templates window now. From now on, whenever someone edits this mounted file, the other team members get the new templates.

newLiveTemplate

Notes:

  • When you modify a template, Re# doesn't save it unless you explicitly tell it to. It will only save the file when you quit visual studio.
  • If you use TFS, visual studio won't check out the template automatically. This means that you will have to manually check out the file, edit it, then check it back in manually. This isn't a big issue, but it's still a nuisance.
  • Re# will only load the template file when you open visual studio.

This last note actually causes a chicken-and-egg problem. My daily routine is as follows: open visual studio (== load the file template), get the latest version from TFS (== update the file template). This means that I first load the template, then get the latest version of the template on disk. If you want to reload it, you have two choices: restart VS, or go to the templates explorer and reload the template explicitly.

This would not be a problem with SVN of course.

Posted on Monday, October 20, 2008 10:33 AM | Back to top


Comments on this post: Sharing ReSharper settings in your team

# re: Sharing ReSharper settings in your team
Requesting Gravatar...
What about the inspection rules? There are many rules that need to be configured and shared throughout the team (ex: convert var to explicit declaration"). Is there a share/export for these settings as well?
Left by Marcel Bradea on Jul 29, 2009 11:21 AM

# re: Sharing ReSharper settings in your team
Requesting Gravatar...
Might also wan to check this out: http://www.jetbrains.com/resharper/webhelp/index.jsp?Configuring_ReSharper__Sharing_Configuration_Options.html
Left by Stonie on Sep 10, 2009 5:08 AM

Your comment:
 (will show your gravatar)
 


Copyright © Michel Grootjans | Powered by: GeeksWithBlogs.net | Join free