How to share the codestyle settings for all the .NET developers in the company

Hello

I have asked this before but to be honest the sharing of the codestyle is
still not really clear to me. There are 3 options in the ReSharper Options
dialog:

1. Not shared, applies to all solutions opened by the current user
2. Shared accross the team, per solution
3. Not shared, per solution, stored in a file

I am confused about the 3rd option. Do you guys mean any of the following:

"Not shared per solution, stored in a file"
"Not shared, per solution stored in a file"
"Shared across the team to all solutions"

I think that it is the placement of the comma or the construction of the
sentence. What we need to know is how the following scenario is supported:

We have 30 developers, all working on several projects and what we want is a
way to share the codestyle settings for all of the 30 developers. Meaning
that if we want to put the braces on the next line, we want to do this for
every single one of the 30 developers. To support this scenario, which of
the 3 options should we choose? Is it possible to put the settings file on
the network and have everyone pointing to the file on the network?

Cheers

Gabriel Lozano-Moran


3 comments
Comment actions Permalink

Hi Gabriel,

I'm struggling with this point too and don't have the answer but...

> Is it possible to put the settings file on

the network and have everyone pointing to the file on the network?


we have the code-style file under version control in a "Shared" branch
that is used in every project. Every developer imports this file. I
don't know what happens if somebody changes the file and also would like
to get some insights from the JetBrainers on that ;)


Regards,
Stefan Lieser
--
http://nhplugin.lieser-online.de

0
Comment actions Permalink

Hello,

3. Not shared, per solution, stored in a file
I am confused about the 3rd option.


Well, it's really confusing — mostly because the underlying behavior is somewhat
confusing too. It's a bit of a legacy that comes from older R# versions,
and will be addressed when we rework the Settings subsystem.

Per-solution means that the settings apply to the current solution only.

Stored in a file means that you explicitly specify an external file (possibly,
on a network share) that holds the settings from now on.

Not shared means that the file itself (and the settings in it) does not get
available to all of the developers on the team automatically; however, a
link to the file is shared along with the solution file. If you provide for
the file availability by some external means (eg specify it as a UNC path
visible to all of the developers on the solution), then the settings will
be shared indeed.

We have 30 developers, all working on several projects and what we
want is a way to share the codestyle settings for all of the 30
developers.


There is no direct way to achieve that. There's currently no sharing scope
beyond the solution scope. I suppose we'll have the feature some day soon
enough.

Probably, the current model is driven by the fact that usually code styles
differ between different teams even in the same company.

To work the thing around, you could export the code style settings, put them
on a UNC path available to all of the devs, and set up each of the solutions
for the third option (... in external file) pointing to that UNC file path.
There is no graceful conflict resolution mechanism for the scenario, but
everything should go as expected unless two developers modify the file within
a Visual Studio session of each other. The latter case probably constitutes
a race condition.


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0
Comment actions Permalink

Hello,

We are evaluation ReSharper 4.0 to improve code quality across our teams and we have the same problem. We want all developers to use the same Code Style. We put this code file on a read-only share so no developer can modify this file directly and all developers have access to this file. We have 2 problems with this solution:
1. We need to set Code Style in every solution. This is not a large problem because there is a limited set of solutions.
2. When you set "Not shared, per solution, stored in a file:" enter the path of the settings file and press "OK" you get an error dialog saying "Access to the path '
bla\bla.xml' is denied". If you press OK you keep getting the error. If you press "Cancel" after you pressed "OK" the dialog is closed and the settings are property used. If I reopen the settings dialog the correct path is entered. Could you please change this behavior so users do not need to press ok, click the error box away and then press Cancel. Looking at process monitor revealed that this error occurs because ReSharper wants to create the file. I would like to suggest to change this behavior to just using the file if it already exists.

Thanks in advance,

Bart



Attachment(s):
Capture.JPG
0

Please sign in to leave a comment.