gpt4 book ai didi

asp.net-mvc - Visual Studio 2013 持有 App_global.asax.PDB 文件?

转载 作者:行者123 更新时间:2023-12-03 10:41:20 24 4
gpt4 key购买 nike

自从升级到 Visual Studio 2013(从 2012 年开始),我注意到在调试我的 ASP.NET MVC 5 应用程序时,我偶尔会通过 IIS Express 获得编译器错误转储:

Description: An error occurred during the compilation of a resourcerequired to service this request. Please review the following specificerror details and modify your source code appropriately.

Compiler Error Message: CS0042: Unexpected error creating debuginformation file 'c:\Users\Jeff\AppData\Local\Temp\Temporary ASP.NETFiles\root\368a9040\83fb9039\App_global.asax.PDB' --'c:\Users\Jeff\AppData\Local\Temp\Temporary ASP.NETFiles\root\368a9040\83fb9039\App_global.asax.pdb: The process cannotaccess the file because it is being used by another process.

Source Error:

[No relevant source lines]

Source File: Line: 0


如果我打开 Process Explorer,然后搜索 App_global.asax.pdb(DevEnv.exe 具有)的句柄并强行关闭它,然后刷新页面,则此错误就会消失。但是,这很不方便,而且我在 2013 年之前从未这样做过。
任何人都知道为什么会在 2013 年间歇性地发生这种情况,但之前没有?
我能想到的唯一可能的事情是 Razor Generator 的一些模糊问题。我使用的 MSBuild 步骤,但我不知道为什么它会在 App_Global.asax 上而不是 View 上(即使那样,它也不应该编译为未修改的 View )

最佳答案

升级到 VS2013 后,我们在开发的大型 webforms 应用程序上遇到了这个问题。我们解决了从我们的 Web.Config 文件中的编译元素上删除 optimizeCompilations="true"属性的问题。

我也尝试过 VS2013 Update 1 和 VS2013 Update 2 RC,但它们都没有解决这个问题。

关于asp.net-mvc - Visual Studio 2013 持有 App_global.asax.PDB 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19916594/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com