问题
I work in a codebase where for historic reasons not all projects have identical coding conventions. In fact, within a single .sln I have projects requiring different naming conventions.
Is there a way to have resharper use different settings based on which project the file I'm editing lives in?
回答1:
Check out the Resharper Settings Manager tool
You'll need to first install the ReSharper Power Toys to use it.
回答2:
Since ReSharper 6.1 you can finally have per project settings!
Basically, all you need to do is to create a file named <project file name>.DotSettings
, e.g. MyUnitTest.csproj.DotSettings
.
See this blog post for more info.
回答3:
Resharper now supports applying different settings to different Solutions from Resharper 6.1. See this blog post for further details http://blogs.jetbrains.com/dotnet/2011/11/resharper-settings-in-61/
However, from the looks of it, you cannot yet apply different settings to different projects within a solution. This is a feature I would very much welcome too!
回答4:
Additionally (to the other answers) when using SVN the "*.sln.DotSettings" files are changed every time a different machine opens the solution. To combat this set the read-only attribute on the DotSettings files, after checking out from the repository.
来源:https://stackoverflow.com/questions/3923568/how-do-i-setup-per-assembly-resharper-settings