编辑并继续在VS不起作用2010 / ASP.Net MVC 2 [英] Edit and Continue does not Work in VS 2010 / ASP.Net MVC 2

查看:536
本文介绍了编辑并继续在VS不起作用2010 / ASP.Net MVC 2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

虽然启用编辑并继续我的ASP.Net MVC 2项目的Web选项卡上被选中,我不能在实际上改变源$ C ​​$ C运行时。例如,如果我尝试编辑控制器,而在暂停调试器,我不能改变的文件(就如同只读)。

Although Enable Edit and Continue is checked on the Web tab of my ASP.Net MVC 2 project, I cannot in fact change the source code while running. For example, if I try to edit a controller while paused in the debugger, I cannot change the file (acts as if read only).

我发现了一个相关的职位编辑和继续的ASP.NET Web项目的,但是

I found a related post Edit and continue in ASP.NET web projects, however


  • 的答案似乎暗示我应该至少​​能够编辑code,然后重新加载页面看到的结果。

  • 我不知道的区别是Web应用程序和网站项目之间

推荐答案

的区别是,Web应用程序需要编译同时执行(甚至$ C $后面三)当一个网站是动态编译。

The distinction is that a Web Application needs to be compiled while a Web Site is compiled dynamically when executed (even the code behind).

由于ASP.NET MVC使用的Web应用程序每次你让你需要重新编译它,并重新编译要求离开调试模式的改变时间。事实上,你可以修改的意见和谐音,而无需重新编译但控制器逻辑,你总是需要重新编译的。

As ASP.NET MVC uses a web application every time you make a change you need to recompile it and recompiling requires leaving the Debug mode. Indeed you could modify views and partials without the need of recompiling but for controller logic you always need to recompile.

为了加快速度,我会建议你如下:

To speed things up I would recommend you the following:


  1. 在当前视图和谐音工作(即做一些设计的东西)上运行的应用程序<大骨节病> Ctrl + F5键而不是<大骨节病> F5 这将只是开始在正常模式下的应用和您的更改将在刷新浏览器自动拾取

  2. 当后面的 code工作的你应该有一个相应的单元测试,让您快速检查的行为。在这种情况下,在调试运行模式可能是因为你可能需要检查值更加有用。

  1. When working with views and partials (i.e. doing some design stuff) run the application with Ctrl+F5 instead of F5 which will simply start the application in normal mode and your changes will be automatically picked up when you refresh the browser
  2. When working with code behind you should have a corresponding unit test that will allow you to quickly check the behavior. In this case running in Debug mode might be more useful as you might require checking values.

这篇关于编辑并继续在VS不起作用2010 / ASP.Net MVC 2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆