Visual Studio 2012启动错误的项目进行调试 [英] Visual Studio 2012 Launches Wrong Project For Debugging
问题描述
我在Visual Studio 2012解决方案中有一个ASP.NET Web应用程序项目.我将其称为A.
I've got an ASP.NET web application project in a Visual Studio 2012 solution. I'll refer to this as A.
我将A的目录复制到一个新目录以对其进行克隆.我将其称为B.
我对A和B进行了广泛的更改,以至于它们甚至都不遥不可及.样式表,脚本,HTML和后端都是不同的.
I made extensive changes to both A and B to the point that they are not even remotely similar. Stylesheets, scripts, HTML, and back end is all different.
我启动了A进行调试,它按预期出现在我的浏览器中.我调试了一段时间,然后通过Visual Studio 2012工具栏上的停止调试"图标终止了调试.
I launched A for debugging, and it appeared in my browser as expected. I debugged the application for awhile, and then terminated debugging via the "stop debugging" icon on the toolbar within Visual Studio 2012.
然后我启动了B进行调试.相反,我得到了A.
I then launched B for debugging. Instead, I got A.
我曾尝试清除浏览器缓存,但这并不是问题所在,因为应用程序的服务器端也是错误的.
I tried clearing browser cache, though, this couldn't be the problem because the server side of the application was wrong too.
运行Clean后,我尝试重建项目.在尝试调试B时,我仍然看到A.
I tried Rebuilding the project, after running Clean. I still see A while trying to debug B.
我试图杀死与调试会话相关的所有进程,包括所有iisexpress.exe,MSBuild.exe,WebDev.WebServer40.EXE,Microsoft.VisualStudio.Web.Host.exe实例.
I tried killing all processes related to the debugging session including all iisexpress.exe, MSBuild.exe, WebDev.WebServer40.EXE, Microsoft.VisualStudio.Web.Host.exe instances.
我尝试完全关闭Visual Studio 2012,重新打开它,然后重试调试.
I tried closing Visual Studio 2012 completely, reopening it, and retrying debugging.
编辑
第三次关闭并重新打开VS2012之后,它现在开始运行,使我可以看到B.没有其他更改.
After closing and reopening VS2012 for a third time, it started now allowing me to see B. Nothing else has changed.
我能想出的是,必须更改某种类型的项目设置,以反映该项目与复制之前的项目存在于不同的空间中,但是我还没有找到这样的设置
Best I can come up with is there must be some type of project setting that needs to be changed to reflect that the project lives in a different space than it did before being copied, but I have yet to track down such a setting.
我想念什么?
推荐答案
我今天刚刚遇到了这个问题,完全按照您的意愿完成(复制了一个项目,然后进行了编辑).因此,我想分享我的解决方案.
I have just come across this issue today, having done exactly as you (copied a project, and then edited). And hence i would like to share my solution.
如果转到项目B 的属性
(位于解决方案资源管理器中),则会找到 Web
标签:
If you go to Project B's Properties
(found in solution Explorer), you will find a Web
tab:
在您的服务器
部分中,将 Project Url
更改为:
In your Servers
section, alter the Project Url
to:
http://localhost:
+(数字+1)+ /
http://localhost:
+ (number +1) + /
,然后点击创建虚拟目录
然后您应该能够重新运行您的项目,并且由于它们运行在不同的Url上,因此您不应再看到这种冲突.
You should then be able to re-run your project and since they're running off different Url's, you shouldn't see this clash again.
这篇关于Visual Studio 2012启动错误的项目进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!