I want to delete all bin and obj folders to force all projects to rebuild everything

后端 未结 26 2084
迷失自我
迷失自我 2020-11-28 16:53

I work with multiple projects, and I want to recursively delete all folders with the name \'bin\' or \'obj\' that way I am sure that all projects will rebuild everything (so

26条回答
  •  独厮守ぢ
    2020-11-28 17:53

    I use a slight modification of Robert H which skips errors and prints the delete files. I usally also clear the .vs, _resharper and package folders:

    Get-ChildItem -include bin,obj,packages,'_ReSharper.Caches','.vs' -Force -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse -ErrorAction SilentlyContinue -Verbose}
    

    Also worth to note is the git command which clears all changes inclusive ignored files and directories:

    git clean -dfx
    

提交回复
热议问题