Prevent formatting on project files marked as Build Action = None
I keep a folder in my project for “Snippets” with Namespace Provider = false and my .cs, .razor files are all set to Build Action = None. These are for developer quick references to lookup how to accomplish a task or other project specific details and gotchas … primarily to save developer hours/days/weeks of trying to resolve some of the more bizarre issues with platform technology (and there are plenty).
Unfortunately Resharper keeps trying to reformat everything as I type or copy past into these “snippet files”. I can't use the option to exclude .cs or .razor files as that would kill almost all reformatting.
I am a little puzzled why Resharper wants to do anything at all with folders set to namespace provider = false and/or files set to Build Action = None?
Any options here?
Rob.
Please sign in to leave a comment.
thank you for contacting us.
Please try to disable ReSharper (VS Tools | Options | ReSharper | Suspend) and check if the issue still exists.
Thank you!
Hi Olga,
If I disable Resharper the issue no longer exists. I have another development PC at work with same version of ReSharper and it does NOT have this problem when enabled. So I’m guessing it’s some “setting” on ReSharper that’s causing this, but I have no idea where to look?
Rob.
thank you for the answer.
Could you please export your settings from the PC where the issue is reproduced (Extensions | ReSharper | Manage Options | Import&Export | Export to file) and send them to us?
You can upload it here: https://uploads.jetbrains.com/
Thank you!