How do I setup per-assembly resharper settings

天涯浪子 提交于 2019-12-23 08:55:06

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!