C# 无法在Visual Studio 2017中复制文件.exe
我有一个参考.net Framework的asp.net核心项目,我正在使用Visual Studio 2017 Enterprise。当我尝试构建解决方案时,遇到以下错误:C# 无法在Visual Studio 2017中复制文件.exe,c#,asp.net,visual-studio,asp.net-core,visual-studio-2017,C#,Asp.net,Visual Studio,Asp.net Core,Visual Studio 2017,我有一个参考.net Framework的asp.net核心项目,我正在使用Visual Studio 2017 Enterprise。当我尝试构建解决方案时,遇到以下错误: Unable to copy file "obj\Debug\net461\MyProject.exe" to "bin\Debug\net461\MyProject.exe". Access to the path 'bin\Debug\net461\MyProject.exe' is denied. 即使我清理了解
Unable to copy file "obj\Debug\net461\MyProject.exe" to "bin\Debug\net461\MyProject.exe".
Access to the path 'bin\Debug\net461\MyProject.exe' is denied.
即使我清理了解决方案并重新构建,我仍然存在此错误
有人遇到此错误吗?转到任务管理器,查找Microsoftvshost.exe并将其全部杀死。即使停止调试,exe也可以在后台继续运行。这会导致文件被锁定 您可能正在运行该程序。你必须杀了它。谢谢你的帮助@Ottak。我还不得不关闭我的防病毒软件一段时间,它看起来好像保存着那个文件。