Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Delete bin and obj Folders in .NET MAUI
Victor Hugo Garcia
Victor Hugo Garcia

Posted on

     

Delete bin and obj Folders in .NET MAUI

Every .NET and .NET MAUI developer has encountered that moment when mysterious build issues appear, and the age-old advice rings true: "Have you tried deleting your bin and obj folders?" These folders, while essential for storing compiled builds and cache files, can sometimes cause headaches during development.

Today, I'm excited to introduce a simple yet powerfulVisual Studio Code extension that streamlines this common cleanup task for .NET developers.


Real-life Scenarios

When starting a new project in .NET MAUI, setting up the app icon or splash screen is an important step. This often involves ensuring the design meets the right specifications, such as proper padding, sizing, and background color. If you find that changes aren’t reflecting as expected after deleting the app from the emulator or device, it’s a good idea to clear the associated folders as well. This ensures the updates are applied correctly and avoids potential design inconsistencies.

How to Use the "Delete Bin and Obj Folders" Extension

1. Install the extension

  • Open the Extensions panel in Visual Studio Code.
  • Search for Delete Bin.
  • Find "Delete Bin and Obj Folders" by vhugogarcia and click Install.

Extensions Panel

2. On the Explorer window

  • Right-click the folder where you would like to delete the /bin and /obj folders
  • Click the option: "Delete /bin and /obj Folders"

Context Menu Option

3.Rebuild and Keep Coding

  • Rebuild your project to generate fresh build filesYou’ll be starting from a clean slate, ready to tackle the next coding challenge.

Conclusion

The Delete Bin and Obj Folders extension is all about keeping things simple and saving you time. It’s a small but powerful extension that helps .NET developers like you and me to run our .NET app with a fresh build and generated cache files. While it may seem like a small change, saving a couple of clicks and the time spent searching for those folders can add up. Over time, this extension will save you precious seconds and minutes, making your workflow smoother and more efficient.

Download the extension now and see how much easier it makes your day-to-day development. And if you enjoy using it, don’t forget to leave a review, contribute, share your feedback—it means the world and helps me create even better tools for our community!

Follow me on Social:

Top comments(1)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
joshua_sells_18b6f1f022dd profile image
Joshua Sells
15 years experience with Xamarin/Maui. General SW engineer and architect.
  • Joined

For those not using VS Code, this little snippet works wonders to extend the standard Clean build option when added to any .csproj or Directory.Build.props file:

<!-- Make sure any old temp files are removed--><Target Name="CustomClean" AfterTargets="Clean" Condition="$([MSBuild]::IsOSPlatform('Windows'))">    <Message Text="Running custom clean up... $(ProjectDir)bin" />    <Exec Command="rmdir /s /q $(ProjectDir)bin" />    <Message Text="Running custom clean up... $(ProjectDir)obj" />    <Exec Command="rmdir /s /q $(ProjectDir)obj" /></Target><Target Name="CustomCleanMac" AfterTargets="Clean" Condition="$([MSBuild]::IsOSPlatform('OSX'))">    <Message Text="Running custom clean up... $(ProjectDir)bin" />    <Exec Command="rm -R $(ProjectDir)bin" ContinueOnError="true" />    <Message Text="Running custom clean up... $(ProjectDir)obj" />    <Exec Command="rm -R $(ProjectDir)obj" ContinueOnError="true" /></Target>
Enter fullscreen modeExit fullscreen mode

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Passionate software engineer with a love for design and an unwavering commitment to enjoying life to the fullest.
  • Location
    Austin, Texas
  • Education
    Instituto Tecnológico de Ciudad Guzman
  • Work
    Software Engineer at simplea.com
  • Joined

More fromVictor Hugo Garcia

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp