I have found a few things around the internet about doing this, but none of them are permanent. I can get mono to use my policy, but the next time I switch to Unity and back it is using the default policy again.
I’m a bit of a neat freak when it comes to how my code looks and am getting really frustrated with having to write a block of code and then go back and put it how I typed it in the first place.
Any help appreciated.
From my experience and i’m similar that i present my code layout in a particular way, a new solution in monodevelop gets all the defaults, creating a custom policy that i save, allowing me to apply it to new solutions when created is the trick.
Edit the policy inside of the
‘Custom Policies’ window, making
sure your policy is selected.
Project->Apply Policy->Apply Stock
or Custom Policy Set (select your
but you want to apply it to your solution:
- (right click the solution, then Tools->Apply Policy) and save the solution under a new filename. That way, Unity won’t overwrite your settings every time it regenerates the projects.
I think I found a better solution than forking the sln project.
Find where MonoDevelop store the policies.
In the case of Mac is:
You will find there a
Default.mdpolicy.xml and your own mdpolicy file (
Just overwrite the default with yours and suddenly it all goes to your policy as the default.
I’ve tried a couple times and seems to be working fine.