Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio starting the wrong project

I have a solution with 5 projects. When I set a project to be the startup-project and hit the debug button, one of the other prjects is started. Is that a bug? Or am I missing something here?

like image 512
Boris Avatar asked Oct 04 '12 18:10

Boris


People also ask

How do I change the default project code in Visual Studio?

In Visual Studio, you can get this done by – right click on the project, and choose “ Set as Startup project" .

How do I remove a project from Visual Studio startup?

Select a project and right click, then select 'Remove from StartUp Projects...'


2 Answers

If your projects are web applications, try assigning different Ports to Project Urls. It can be done in Project / Properties / Web / Project URL. My Visual Studio often runs the wrong project if they have the same url.

like image 101
BernardV Avatar answered Sep 20 '22 14:09

BernardV


I did not want to change the application root url so I did this which worked well.

Go to Project / Properties / Web / Project URL, and click the Create Virtual Directory button. It will fix which version of your app is being used in IISExpress.

(I have several different branches that I use and this is a simple fix so I can use the same port for each... then my browser history still works.)

like image 45
Jess Avatar answered Sep 19 '22 14:09

Jess