Visual Studio在调试时锁定文件 [英] Visual Studio locking files while debugging

查看:867
本文介绍了Visual Studio在调试时锁定文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含多个项目的VS解决方案。在调试特定项目时,所有源文件都被VS锁定。我想解开debugee不依赖的消息来源。有没有办法在一个解决方案中做到这一点?

I have a VS solution containing several projects. While debugging a particular project all the source files are locked by VS. I would like to unlock sources that the debugee doesn't have dependency on. Is there any way to do this within one solution?

更新:

我正在使用Win XP SP3 32bit。 Visual Studio 2010,C#。已启用编辑并继续。该解决方案包含6个项目(实际上数量不重要),其中5个项目依赖于使用Entity Framework的数据访问层项目。 5个中没有一个具有任何相互依赖性。它们是WinForms和控制台应用程序。我希望能够运行其中一个项目,并在不停止第一个项目的情况下对其他项目进行更改。问题是启动和停止项目需要相当长的时间。

I'm using Win XP SP3 32bit. Visual Studio 2010, C#. Edit and Continue is enabled. The solution contains 6 projects (number in not important actually), 5 of them depend on the data access layer project which uses Entity Framework. None of the 5 have any mutual dependencies. They are WinForms and Console applications. I would like to be able to run one of the projects and make changes to others without stopping the first. The problem is starting and stopping the project take considerable amount of time.

推荐答案

编辑并继续功能阻止您编辑文件如果调试器没有停止程序。简单的解决方法是Debug + Break All,然后您应该能够编辑文件,只要您的更改不违反E + C施加的限制,您的更改将立即生效。这是最有效的工作流程。

The Edit and Continue feature is preventing you from editing files if the debugger hasn't stopped the program. The simple workaround is Debug + Break All, you should then be able to edit the files, your changes will be immediately effective provided your changes do not violate the restrictions imposed by E+C. This is the most efficient work flow.

严厉的方法是禁用编辑并继续。工具+选项,调试器,编辑和继续,取消选中启用复选框。

The heavy-handed approach is to disable Edit and Continue. Tools + Options, Debugger, Edit and Continue, uncheck the Enable check box.

这篇关于Visual Studio在调试时锁定文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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