开发者

Disable formatting in ReSharper/Visual Studio

开发者 https://www.devze.com 2022-12-26 02:55 出处:网络
Is there a simple way to disable automatic formatting for a specific file in Visual Studio 20开发者_运维问答08 using ReSharper?AFAIK, there is no option to conditionally disable the Auto-Format by fil

Is there a simple way to disable automatic formatting for a specific file in Visual Studio 20开发者_运维问答08 using ReSharper?


AFAIK, there is no option to conditionally disable the Auto-Format by file type or specific file with ReSharper 4.5. The only option is to enable/disable for all files:

ReSharper > Options > Editor: Auto-format on semicolon/closing brace


In ReSharper 7 (and few prior versions) you can specify generated files masks, those will not be formatted.

ReSharper->Options->Code Inspection->Generated Code->Generated file masks

For example if I have a file that contains reference data (as an array, for example), I call file for example States.data.cs and add *.data.cs to generated files masks list.

0

精彩评论

暂无评论...
验证码 换一张
取 消