Sunday 30 September 2012

.hgignore for Visual Studio and Umbraco

If you're working with mercurial then you're probably familiar with the task of setting ignore rules for files you don't need to commit.

Here are a few simple .hgignore rules which will take care of most situations. Just copy and paste into your .hgignore file.


syntax: glob
*/_ReSharper.*
*/bin/*
*/obj/*
*.suo
Source/Website/App_Data/TEMP/*
*/ClientDependency/*
Source/Website/App_Data/*/package.xml
*.DotSettings*



Deleting unwanted artifacts from a Visual Studio Solution

I get annoyed with all the junk in my solution which I don't need. This is caused by many otherwise useful programs (eg. Resharper). So I made a batch file to delete everything I don't need.


This is pretty self explanatory.

Put this in a batch file. Run it.


FOR /D /R . %%X IN (_ReSharper.*) DO RD /S /Q "%%X"
FOR /D /R . %%X IN (bin) DO RD /S /Q "%%X"
FOR /D /R . %%X IN (obj) DO RD /S /Q "%%X"
DEL /s *.DotSettings.*
DEL /ah /s *.suo