2015-12-16 40 views
0

未能使用Visual Studio 2013,我突然開始得到這個錯誤,當我構建解決方案:的Visual Studio - 「複製」任務意外

The "Copy" task failed unexpectedly. 
System.Runtime.InteropServices.COMException (0x800710FE): This file is currently not available for use on this computer. (Exception from HRESULT: 0x800710FE) 
    at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) 
    at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode) 
    at Microsoft.Build.Shared.NativeMethodsShared.ThrowExceptionForErrorCode(Int32 errorCode) 
    at Microsoft.Build.Tasks.FileState.EnsurePopulated() 
    at Microsoft.Build.Tasks.FileState.get_FileExists() 
    at Microsoft.Build.Tasks.Copy.IsMatchingSizeAndTimeStamp(FileState sourceFile, FileState destinationFile) 
    at Microsoft.Build.Tasks.Copy.DoCopyIfNecessary(FileState sourceFileState, FileState destinationFileState, CopyFileWithState copyFile) 
    at Microsoft.Build.Tasks.Copy.Execute(CopyFileWithState copyFile) 
    at Microsoft.Build.Tasks.Copy.Execute() 
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 
    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() ScottProj 

我並沒有改變有關建設任務或項目什麼/解決方案應該導致這種情況的配置。我正在改變代碼,然後出現。我回滾了之前發生的特定更改,但沒有解決它。沒有自定義構建事件,只是一個簡單的構建 - >構建解決方案。我試過這些東西:

清理並重建瞭解決方案。 創建另一個構建配置。 已關閉VS 2013. 重新啓動。 刪除了obj文件夾。

我的下一個操作是刪除項目並從源代碼控制中再次獲取它。

任何想法可能會導致這種情況或將來會阻止它?

編輯:我可以手動將文件複製到另一個目錄和重建的方式,排除的「bin」和「目標文件」文件夾。

回答

1

的問題是,在我們的環境中,「我的文檔」文件夾中,我一直在存儲VS項目,被自動同步到網絡共享。但有時候,會出現同步問題,並且DLL將永遠鎖定。 (從這個問題,我發佈了幾個月前的DLL文件,仍被鎖定)。

我的解決方案是移動解決方案,這是不同步到網絡共享的文件夾。這些文件保存在源代碼管理中,所以我不需要對它們進行備份。

相關問題