调试时编辑 ASP.net Razor 视图文件时出现问题
我正在 VS 2010 中使用 RAZOR 构建 MVC3 应用程序。TFS 2010 用于源代码控制。
调试应用程序时,能够动态修改 Razor 视图文件会很有帮助。如果我在开始调试之前在 VS2010 中打开一个签出的视图文件,我可以在调试时编辑该文件。如果我开始调试后打开它,无论签出与否都无法编辑。
有趣的是,如果我在开始调试后打开一个只读文件并开始在视图中输入进行编辑,该文件将从源代码管理中检出,但无法修改。此外,当我停止调试时,我必须关闭该文件并在 VS 中重新打开它才能编辑它。
只是为了澄清,如果在开始调试后,我打开一个已经签出的视图文件(不是只读),我无法编辑该文件。当我停止调试时,我必须关闭并重新打开该文件才能对其进行编辑。
我已打开“编辑并继续”,并且它对控制器和模型按预期工作。
感觉好像有一个地方我缺失了。
感谢您的帮助。
I am building an MVC3 application using RAZOR in VS 2010. TFS 2010 is being used for source control.
When debugging the application, it is helpful to be able to modify the Razor view files on they fly. If I open a checked-out view file in VS2010 before I start debugging, I can edit this file while I am debugging. If I open it after I start debugging, it cannot be edited whether it is checked out or not.
Interestingly enough, if I open a read-only file after I start debugging and begin to type in the view to edit it, the file is checked out from source control, but cannot be modified. Additionally, when I stop debugging, I must close the file and reopen it in VS in order to edit it.
Just to clarify, if after I start debugging, I open a view file I already had checked out (not read-only), I cannot edit this file. When I stop debugging, I have to close and re-open the file to be able to edit it.
I have edit and continue turned on, and it works as expected for the controllers and models.
It feels like there is a setting that I am missing somewhere.
Thank you for your assistance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经遭受这个错误一年多了。请参阅我关于此问题的问题:在运行时编辑视图
此修补程序解决了该问题对我来说。
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails。 aspx?DownloadID=40811
I've suffering this bug for more than a year. See my question about the problem here: Edit a view in Runtime
This hotfix solve the problem for me.
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=40811