在VS2012 c#项目的构建过程中,我一直得到这个错误
Error 41 Could not copy "obj\Debug\WeinGartner.WeinCad.exe" to
"bin\Debug\WeinGartner.WeinCad.exe".
Exceeded retry count of 10. Failed.
Error 42 Unable to copy file "obj\Debug\WeinGartner.WeinCad.exe" to
"bin\Debug\WeinGartner.WeinCad.exe". The process cannot access the file
'bin\Debug\WeinGartner.WeinCad.exe' because it is being used by another
process.
现在我知道该终止进程了
Weingartner.WeinCad.vhost.exe
(有时)有用,但这让我很紧张。有办法阻止这一切发生吗?
调试器设置为
第一个消息错误解决方案:
在我的例子中,问题在于路径长度。
解决方案是减少/更改问题文件路径。如果问题出在项目中的文件上,你应该减少/更改存储库路径。
C:\Users\userTest\folder1\folder2\folder3\...\folderX\myProject\...\file.exe
如。
C:\Users\userTest\folder1\myProject\...\file.exe
换句话说,默认情况下路径长度不能超过260个字符。
原线程答案
(https://stackoverflow.com/a/73686473/12678101)
我正在研究一个微服务项目解决方案,我需要同时运行两个项目,冲突发生在lunchsettings.json
applicationurl: {portNo}部分用于两个正在运行的项目是相同的端口
lunchsettings。第一个项目的Json
...
"Project#1": {
...
"applicationUrl": "http://localhost:5001",
...
}
lunchsettings。第二个项目的Json
...
"Project#2": {
...
"applicationUrl": "http://localhost:5001",
...
}
来修复它
lunchsettings。第一个项目的Json
...
"Project#1": {
...
"applicationUrl": "http://localhost:5001",
...
}
lunchsettings。Json for secondproject
...
"Project#2": {
...
"applicationUrl": "http://localhost:5002",
...
}