개발자의 사투

C# 재시도횟수(10)을 초과하여 작업을 수행하지 못했습니다/파일은 다른 프로세스에서 사용중이므로 프로세스에서 엑세스할 수 없습니다. 본문

컴방/C#

C# 재시도횟수(10)을 초과하여 작업을 수행하지 못했습니다/파일은 다른 프로세스에서 사용중이므로 프로세스에서 엑세스할 수 없습니다.

개발자룽 2021. 3. 12. 15:30

https://stackoverflow.com/questions/47593142/visual-studio-locked-file

 

Visual Studio locked file

I use the latest Visual Studio Community 2017 (15.4). And since i installed Visual Studio (never worked in it before). I have ALWAYS despite version had this issue. After compiling a couple of time...

stackoverflow.com

 

//$(TargetPath) == "$(TargetDir)$(TargetFileName)"?

 

 

프로젝트 → 속성 → 빌드이벤트 → 빌드 전 이벤트 추가

 

 

if exist "$(TargetDir)$(TargetFileName)" (
rename "$(TargetPath)" "$([System.Guid]::NewGuid()).exe"
)

 

 

 

Unable to copy file "obj\Debug\afile.exe" to "bin\Debug\afile.exe". The process cannot access the file 'bin\Debug\afile.exe' because it is being used by another process.

 

 

 

임시방편.. 혹시 해결하신분 있으시면 댓글 부탁드립니다.

Comments