简体   繁体   English

在VisualStudio2010中调试多个ASP.Net项目

[英]Debug Multiple ASP.Net Projects in VisualStudio2010

I have a solution file with two applications loaded. 我有一个加载了两个应用程序的解决方案文件。 Both are MVC enabled apps, one is a data API the other is a service that consumes the API. 两者都是启用MVC的应用程序,一个是数据API,另一个是使用API​​的服务。 I dont have a server to house this application on yet and would like to debug them both in Visual Studio 2010, it appears that this is not a unique request, and is completely possible via this answer: How to run/debug multiple web application projects with-in the same solution? 我还没有服务器可容纳此应用程序,并且想在Visual Studio 2010中对其进行调试,这似乎不是唯一的请求,并且完全可以通过以下答案进行: 如何运行/调试多个Web应用程序项目在同一解决方案?

项目概况

however converting the site to a web application did not allow me to achieve debugging both projects at once. 但是,将网站转换为Web应用程序并不能使我立即调试两个项目。 I cant even get the web-ports to align. 我什至无法使网络端口对齐。 Is this an instance where I will be forced into using a local IIS installation just for debugging purposes? 这是一个仅出于调试目的而被迫使用本地IIS安装的实例吗? or is the asp.net express server sufficient and I have not found the correct resource for setting up my applications? 还是asp.net Express服务器足够并且我没有找到用于设置应用程序的正确资源?

项目设定

If you need both sites to be available on same URL you have two options: 如果您需要两个站点都可以在同一URL上使用,则有两个选择:

  1. Use external server to host sites instead of using integrated server (any big reason you can't install IIS on your dev machine?) 使用外部服务器托管站点,而不使用集成服务器(您无法在开发机器上安装IIS的重大原因?)
  2. Create 3rd project as parent of those two and add files belonging to those projects into third one. 创建第三个项目作为这两个项目的父项,并将属于这些项目的文件添加到第三个项目中。 You don't need to remove other two projects or any files from them. 您无需从中删除其他两个项目或任何文件。 Just make sure that you are not simply creating a copy of files, but referencing same ones. 只要确保您不只是在创建文件副本,而是引用相同的文件即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM