Resharper 4.5 - sharing usersetting.xml - help deaying roll-out across team
Just purchased 4.5 for all our developers and invested lots of time getting things configured. Love the product thus far, but dissapointed that sharing the .resharper config file only gives us a common Code Style Settings. We need to share the Severity Setting, Context Actions and Custom Cleanup Profiles as well.
So we have a common usersetting.xml file, in which these things appear to be stored.
However, changes made via the Resharper->Options dialog do not appear to be written to this file (as an example, abbreviations). However, when I look in the dialog box they are there.
How can we share a common usersetting.xml file?
When does this file get written out to?
Please help - we want to roll out Resharper across the team but need to understand this before doing so.
Thanks
Jessica
Please sign in to leave a comment.
Hello Jessica,
Settings are written on VS close. Close Visual Studio, then deploy usersettings.xml
file to everyone (don't have any VS with ReSharper open), start VS.
Sincerely,
Ilya Ryzhenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
JP>
JP>
JP> Just purchased 4.5 for all our developers and invested lots of time
JP> getting things configured. Love the product thus far, but
JP> dissapointed that sharing the .resharper config file only gives us a
JP> common Code Style Settings. We need to share the Severity Setting,
JP> Context Actions and Custom Cleanup Profiles as well.
JP>
JP> So we have a common usersetting.xml file, in which these things
JP> appear to be stored.
JP>
JP> However, changes made via the Resharper->Options dialog do not
JP> appear to be written to this file (as an example, abbreviations).
JP> However, when I look in the dialog box they are there.
JP>
JP> How can we share a common usersetting.xml file?
JP> When does this file get written out to?
JP> Please help - we want to roll out Resharper across the team but
JP> need to understand this before doing so.
JP>
JP> Thanks
JP> Jessica
JP> ---
JP> Original message URL:
JP> http://www.jetbrains.net/devnet/message/5253153#5253153
Great, first it is good to know we can share configuration this way. We would ideally like this file to be under source control. We use TFS, so when we do a "get" Visual Studio is opened, and this seems to be causing problems, specifically when we get the "new" usersetting.xml they are not "used" by Resharper, which is already running and using the OLD settings.
Any idea or clever workaround for this?
Thank you
Jessica
We have been using Resharper Settings Manager http://rsm.codeplex.com/ to handle the sharing of settings between all of our developers. It allows you to save all the settings to a file that we put into version control. It also allows you to load that file while VS is running. It also allows for multiple seetings file. We a file that is slightly different for when we write library code versus application code.
-eric
Hi Eric, thanks I just downloaded from Codeplex and will check it out.
If we very carefully follow the below steps, checking the usersettings.xml file in and sharing it across developers seems to work. It also shares it across ALL solutions which is nice.
To GET the latest version of the file from TFS
1. Delete your usersettings.xml
2. Open Visual Studio
3. Add the following path pair to your Workspace to get the file to your documents & settings\username\AppData\resharper\etc..
4. Get the latest version from TFS
5. Close Visual Studio
a. You will be told that this file has been changed externally and asked if you want to ignore these changes- press NO. You want to keep external changes
6. Re-open VS which will re-start Resharper with the new configuration file settings
To make a change to the resharper configuration
1. Check out the usersettings.xml file (MUST DO THIS)
2. Make your change i.e. add an abbreviation, change severity setting, etc.
3. Close Visual Studio to force the changes to be written to the file
4. Open Visual Studio and do a compare to confirm changes are in place
5. Check in usersettings.xml – this will send a message to the team letting them know they need to get the new file
Again, because we are getting a new version of a file that is actually loaded in memory, it is necessary to close Visual Studio and execute these steps in the right order. You can’t just assume getting the lates will do the trick.
Hope someone finds this helpful - perhaps the plugin will make this extra work unnecessary
Jess
Eric, I downloaded and installed, but my Load Settings File menu item is grey out:-( I've posted comment at Codeplex and reviewed the documentation but figured I would ask in case this rang a bell for you. Thanks, Jess
I think that you'll find the plugin easier.
To Get Latest version of the settings file:
1. Set the workspace path if not already done.
2. Do a Get Latest.
3. From the VS menu Resharper->LoadSettings. Select the settings file.
To update the settings file:
1. Check out the file.
2. Make your changes.
3. From VS menu Resharper->Options->settings manager. Select the settings file (if using more than 1). Press update.
4. Check in the file.
No restarts of visual studio needed.
We only found this about 3 weeks ago, but haven't had any issues with it yet.
-eric
Hello Jessica,
This is something we are going to address in ReSharper for version 6, current
version 5 is locked down already and we are only making bug fixes and some
UI things.
Sincerely,
Ilya Ryzhenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
IR> Great, first it is good to know we can share configuration this
IR> way. We would ideally like this file to be under source control. We
IR> use TFS, so when we do a "get" Visual Studio is opened, and this
IR> seems to be causing problems, specifically when we get the "new"
IR> usersetting.xml they are not "used" by Resharper, which is already
IR> running and using the OLD settings.
IR>
IR> Any idea or clever workaround for this?
IR>
IR> Thank you
IR> Jessica
IR> ---
IR> Original message URL:
IR> http://www.jetbrains.net/devnet/message/5253157#5253157
Jessica,
rsm docs are here: http://rsm.codeplex.com/documentation
This app generates it's own settings file so it does not use the usersettings.xml directly.
On a machine that has the correct settings:
Go to Resharper->Options
There should be a new option towards the bottom called something Settings manager. Once selected the right side will allow you to enter a directory where you want to store the files. Set that. Then hit the Add button, This creates a new file that rsm can use and that you can put in tfs. It will then be in the directory you specified earlier. Now close the options. Resharper->Load settings should now be available as you have a file in the directory you specified.
To have others load the file:
Do a get latest of the rsm file
Go to Resharper->Options settings manager.
Enter the download directory. You should see the settings file appear in the list.
Resharper->Load settings.
Ilya, glad to here that this is on the radar.
--eric