DEV Community

esmitt ramirez
esmitt ramirez

Posted on • Originally published at ecode.dev on

Cleaning a C# Form-based project using a .bat

Cleaning a C# Form-based project using a .bat

After creating a Windows Form App project using Visual Studio 2019, and try to push the code to a git repository, I realized there are still garbage files. My initial thought was executing the Clean Project option, however, it does not clean all files that I consider as garbage 😩 (at least on the default setting).

My following thought was to change options into the Setting of Visual Studio, but after a while, I finish adjusting the size of the font on the editor and trying different fonts...procrastination 🤡

To replicate this, I started with a Windows Forms App (.NET Framework) option in my Visual Studio:

Cleaning a C# Form-based project using a .bat

Then, I started coding 🤓 and when before to upload the code to the git repository I clean the code with the following .bat:

You can edit the .bat as you want, it works fine in Windows 10.

Honestly, this is not mandatory at all, the habitual way is adding the file extensions into the .gitignore file and continue with your life, but I can't #sorryNotSorry 👻

I hope that could help more developers who want clean projects 😃

From a geek to geeks

--
✍️ Originally published at https://www.ecode.dev on July 19, 2020. Check out my blog

🦖 If you want to help me to buy my own dinosaur, you can do that in buymeacoffee

Top comments (0)