![](/img/trans.png)
[英]Assembly not moving to bin folder in Visual Studio C# 2010 project
[英]clean up bin obj folders for C# visual studio 2010
有沒有辦法清理所有依賴項和應用程序的bin /和obj /文件夾? 我正在更改一些引用,因此必須從驅動器中手動清理每個依賴項。 這是一個痛苦的過程。 Visual Studio 2010中是否有一個選項,可以在生成解決方案之前清理這些文件夾。 清理解決方案不會清理復制的dll,而只會清理應用程序的可執行文件。
從以下位置導入Get-Directory: https : //stackoverflow.com/a/3270377/89584
Function Get-Directory([string[]]$path, [string[]]$include, [switch]$recurse)
{
Get-ChildItem -Path $path -Include $include -Recurse:$recurse | `
Where-Object { $_.PSIsContainer }
}
然后做:
Get-Directory -Path SOLUTION_DIR -Include obj,bin -Recurse \
| Remove-Item -Force -Recurse
解決方案根目錄在哪里SOLUTION_DIR在哪里。
您可能很容易將其轉換為構建事件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.