Reset R# 8.2.3 for C# to factory defaults
Completed
Hello,
how do we reset R# 8.2.3 to its factory defaults?
We are having serious problems to get the same resharper output on different computers and different user accounts.
We exported all of our settings with resharper and imported them on another machine, but the results are greatly different.
How can we reset project specific settings? IIRC the settings are not stored in the *.csproj file but in the *.sln file? If somebody has a different solution file the team settings would be different?
Greetings Wolfgang
Please sign in to leave a comment.
Hello Wolfgang
ReSharper does not store any stuff in .sln or .csproj files. When you save any solution or project specific settings, ReSharper creates a corresponding .DotSettings file:
- {solution name}.sln.DotSettings next to .sln file;
- {project name}.csproj.DotSettings next to .csproj file;
When a solution is open in Visual Studio, 3 default settings layers appear in ReSharper | Manage Options and you might reset all of them via Reset All button on the dialog.
Thanks!
What is the best way to share those settings between two or more computers and two or more different users?
Although we exported and imported settings (and synchronized those directories you mentioned), it seems that with the same VS solution we get different results when finding code issues.
As one can hide different issues, maybe this could lead to those different results?
But that does not explain, why R# found more null reference exceptions after I deleted all resharper related comments in my source code (none of them where about those NRE...)
Furthermore, it is annoying, when resharper suggests a NRE after string operations.
this is the code that is ok in respect to resharper:
string lower = p.ToLower();
if (lower != null && !string.IsNullOrEmpty(lower))
{
if (lower.Contains("k"))
btemp += 1;
if (lower.Contains("g"))
btemp += 2;
if (lower.Contains("q"))
btemp += 4;
}
But i had it written like this:
if (p.ToLower().Contains("k"))
btemp += 1;
if (p.ToLower().Contains("g"))
btemp += 2;
if (p.ToLower().Contains("q"))
btemp += 4;
In my opinion this code is also correct, and easier to read than the above one. The more "if-else" constructs are in a code, the more error handling has to be done. But in this case, ToLower() doesnt produce a NRE, because the source string is not null either.
Greetings Wolfgang