SENIOR MOBILE DEVELOPERS ALREADY USE THIS TO SAVE TIME

Quick way to clean temp files & directories in Xamarin projects

Stop manually deleting the bin & obj folders from today

The First Prototype
2 min readSep 13, 2020

--

If you have done a weeks’ worth of Xamarin mobile development, you know the need to frequently delete the bin & obj folders in each sub-directory of your solution. This tedious process essentially clears the cache and deletes any improperly built code, so that you can recompile your code, and this magically solves half the problems you face.

All these 11722 unneeded auto-generated files deleted with one command

How does this work?

To achieve this we are going to take advantage of how projects with git version controlling setup correctly, will only “track” the necessary files that are not “auto-generated”. So in order to make this work, you need a file named .gitignore file in your solution directory. The GITIGNORE is a text file that is hidden, thanks to the . in front of it. If you initialized your solution using a git client with a VisualStudio gitignore, this step will already be done for you. If not, just copy the contents from here, and place it in the file.

Remember to always commit all the changes that you need before you perform the next step, since it can occasionally delete some important files that you…

--

--