Here's the error message that I'm getting on a breakpoint in my razor code:
这是我在剃刀代码中断点的错误消息:
A copy of index.cshtml was found in App_Web_cmi1k1de.dll (Server-side symbols), but the source code is different from the version built into App_Web_cmi1k1de.dll (Server-side symbols). To allow the breakpoint to be hit when the source is different blah blah blah...
在App_Web_cmi1k1de.dll(服务器端符号)中找到了index.cshtml的副本,但源代码与App_Web_cmi1k1de.dll(服务器端符号)中内置的版本不同。允许断点在源不同时被击中等等等等等等...
I was getting a very similar error message and I went to the Configuration Manager in my solution and found that one project wasn't set to "debug." I changed it to debug, cleaned out everything in C:\Users\me\AppData\Local\Temp\Temporary ASP.NET Files\root\932eeb02\b9cdc481\, and rebuilt my solution. I see that now in this folder I see a
我得到了一个非常相似的错误消息,我在解决方案中找到了配置管理器,发现一个项目未设置为“调试”。我将其更改为调试,清除了C:\ Users \ me \ AppData \ Local \ Temp \ Temporary ASP.NET Files \ root \ 932eeb02 \ b9cdc481 \中的所有内容,并重建了我的解决方案。我看到现在在这个文件夹中我看到了
C:\Users\me\AppData\Local\Temp\Temporary ASP.NET Files\root\932eeb02\b9cdc481\App_Web_cmi1k1de.dll
C:\ Users \ me \ AppData \ Local \ Temp \ Temporary ASP.NET Files \ root \ 932eeb02 \ b9cdc481 \ App_Web_cmi1k1de.dll
together with a
与...一起
C:\Users\me\AppData\Local\Temp\Temporary ASP.NET Files\root\932eeb02\b9cdc481\App_Web_cmi1k1de.pdb
C:\ Users \ me \ AppData \ Local \ Temp \ Temporary ASP.NET Files \ root \ 932eeb02 \ b9cdc481 \ App_Web_cmi1k1de.pdb
These two files have identical timestamps, down the second. Any idea why I'm getting this error? It doesn't make any sense that the source code would be different than the compiled .dll.
这两个文件具有相同的时间戳,低于第二个。知道我为什么会收到这个错误吗?源代码与编译的.dll不同,这没有任何意义。
3 个解决方案
#1
0
Stop debugging, check that the IIS (or IISExpress) process is no longer running - stop it if required, in Visual Studio right-click the solution Clean, then rebuild. Try debugging again.
停止调试,检查IIS(或IISExpress)进程是否不再运行 - 如果需要,请在Visual Studio中将其停止,右键单击解决方案Clean,然后重建。再试一次调试。
#2
0
Visual studio on your view file, right click properties, Copy to output directory: Copy if newer or Copy Always
视图文件上的Visual Studio,右键单击属性,复制到输出目录:如果更新则复制或复制始终
#3
0
None of the above worked for me. Restarting VS did not work either. Turned out to be related to a recent change I had made to another file. Even though that complied OK, when I undid the change, the error went away.
以上都不适合我。重启VS也不起作用。原来与我最近对另一个文件所做的更改有关。即使这符合确定,当我解除更改时,错误消失了。
#1
0
Stop debugging, check that the IIS (or IISExpress) process is no longer running - stop it if required, in Visual Studio right-click the solution Clean, then rebuild. Try debugging again.
停止调试,检查IIS(或IISExpress)进程是否不再运行 - 如果需要,请在Visual Studio中将其停止,右键单击解决方案Clean,然后重建。再试一次调试。
#2
0
Visual studio on your view file, right click properties, Copy to output directory: Copy if newer or Copy Always
视图文件上的Visual Studio,右键单击属性,复制到输出目录:如果更新则复制或复制始终
#3
0
None of the above worked for me. Restarting VS did not work either. Turned out to be related to a recent change I had made to another file. Even though that complied OK, when I undid the change, the error went away.
以上都不适合我。重启VS也不起作用。原来与我最近对另一个文件所做的更改有关。即使这符合确定,当我解除更改时,错误消失了。