shearichard
shearichard

Reputation: 8362

ASP.NET - copy existing project into solution - but cannot "Start Debugging" on any .ASPX?

In VS2015 I had an existing solution with one project ("projA").

Then, from another solution, I copied the files which make up four other projects to sit in the same directory as "projA".

I then opened the solution which has "projA" in it and used the "Add Existing Project" facility to add the four other projects.

The solution builds and everything looks happy.

However if, using Solution Explorer, I

then what I get served to the browser is not Foo.aspx from 'projB' but the 'Index.cshtml' from 'projA'.

I'm guessing (and 'guessing' is the word) this is related to the fact that 'projA' is marked as the startup project and 'projB' isn't ? So I read here https://msdn.microsoft.com/en-us/library/a1awth7y.aspx that I can have multiple startup projects but I'm not really clear on whether there's some negative aspect to that ? Would it make 'projB' visible in a way it currently isn't ?

Or maybe I've got all that wrong and there's some other reason for this ?

Upvotes: 0

Views: 36

Answers (1)

Tareq
Tareq

Reputation: 1417

I think you can set the behavior you want from the solution property page. So go to the solution property page then common properties then Startup project and select Current selection so that when you select a document from a project it will be the startup project.

Upvotes: 1

Related Questions