【问题标题】:"The process cannot access the file" error when publishing projects in VS 2017在 VS 2017 中发布项目时出现“进程无法访问文件”错误
【发布时间】:2018-05-22 12:50:20
【问题描述】:

当我发布我的 Visual Studio 2017 项目时,有时我会在某些 dll 上收到“进程无法访问文件”错误。错误粘贴在下面。有谁知道是什么原因造成的。

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\Web\Deploy\Microsof t.Web.Publishing.Deploy.FileSystem.targets(96,5):错误:复制文件 obj\Debug\Package\PackageTmp\bin\EntityFramework .dll 到 C:\Websites\MyWebsite\bin\EntityFramework.dll 失败。该进程无法访问文件 'C:\Websites\ MyWebsite\bin\EntityFramework.dll',因为它正被另一个进程使用。

  • 没有关于此错误发生的模式。它随机出现在不同的 dll 文件上。
  • 发生此错误时,我重新启动我的 Visual Studio/计算机,然后尝试另一个发布,它开始工作。

有谁知道解决这个问题的永久解决方案是什么?

【问题讨论】:

    标签: asp.net-mvc visual-studio visual-studio-2017


    【解决方案1】:

    在发布之前,选择不同于默认位置的目标位置。这样可以避免“进程无法访问文件”

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-05-21
      • 2011-06-22
      • 1970-01-01
      • 1970-01-01
      • 2018-01-10
      • 2021-10-25
      • 1970-01-01
      • 2017-07-18
      相关资源
      最近更新 更多