【问题标题】:Visual Studio 2012 err "could not write to output file '....some.dll'Visual Studio 2012 错误“无法写入输出文件 '....some.dll'
【发布时间】:2013-05-29 20:27:21
【问题描述】:

在调试我的 MVC4 应用程序时,使用 Visual Studio 2012 中的本地 IIS Express,每次我得到

Description:
Could not write to output file '...\obj\Debug\some...dll'
The process cannot access the file because it is being used by another process

File: CSC

我总是必须从系统托盘关闭/杀死 IIS - 然后它会构建并运行。

这太烦人了 - 这个问题有没有好的解决方案?

我查看了http://www.csharp411.com/run-asp-net-and-iis-on-windows-vista-and-7-home-premium/,它指的是 IIS 和 inetmgr.exe - 我无法为 IIS-Express 找到它们!

谢谢!

【问题讨论】:

  • 没有人遇到这个问题???

标签: asp.net-mvc visual-studio iis-express


【解决方案1】:

在 Windows 上,您不能打开已经在其他地方打开以读取的文件进行写入(除非之前打开文件的程序特别允许 - 内核不会对正在运行的文件执行此操作)。但是,您可以重命名正在使用的文件,因此您可以在 MSVC 中添加以下内容作为预构建事件:

ren ...\obj\Debug\some...dll ...\obj\Debug\some...dll.bak

根据需要替换路径。不确定你的 IIS 是否会接受它。

【讨论】:

    【解决方案2】:

    不确定是否是同一个问题,但可能与此问题有关: Visual Studio Could not write to output file '...\obj\Debug\Foo.Bar.dll"

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多