Open DreamingDevs opened 7 years ago
TFS Bug#273275
@DreamingDevs - I can't reproduce this. Are you running IIS Express or Kestrel? If using Kestrel, can you make sure they are running on different ports? It is possible the second one failed to start because the ports collided - though I would expect the debugger to stop at that point.
@BillHiebert I am trying to run on IIS Express (for both Web projects I have Debug profile set to IIS Express).
I also even tried by setting Debug profiles to corresponding Kestrel commands (both projects ports are differently - 5000 and 5001). When I did F5, I still have only one project got executed (WebApplication1). Here interesting fact is that the project which got opened up in the browser is holding IIS Express configured port.
For your reference I am including launchsettings.json
and startup.cs
for both projects.
launchSettings.json of WebApplication1 -
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:58972/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"WebApplication1": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
launchSettings.json of WebApplication2 -
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:59015/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"WebApplication2": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "http://localhost:5001",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
Program.cs
holds default code for both projects.
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build();
host.Run();
}
Startup.cs
also holds default code.
Hello, 4 months later, with VS 2017 & using .csproj, I also can't find a way to make this work with IIS Express. Is this still a known issue? My case is that I have 2 sites, one with WebApi/Swagger and another whom is the "admin site" handling the configurations. I always have to stop everything when I want to switch to the other site.
thank you, JS
@masterjs i have exactly the same problem. Did you found a solution? Thank you ;)
@andremmorais nope. sadly nothing. The only "workaround" I though of is to have the 2 VS opened for the same solution and then it will be possible.
One possible solution can be do the publishing of the projects to your machine, creating the sites in the iis and in the pools of the sites changing it to unmanaged code if I'm not mistaken. And then run the projets on the browser and go to the attach to process and attach the process you want to debug on visual studio.Is ugly solution and not pratical but it works xDv
@DreamingDevs with VS 2017 15.3 (preview 6) it is now supported properly. I use it for my projects 1.1 and it really stable.
Steps to reproduce
Create two ASP.Net Core Projects under same solution using VS. Select multiple Startup projects (by right clicking VS Solution file -> Properties -> Multiple Startup projects). For both the projects, select the action as
Start
.Actual behavior
Only the first ASP.Net Core project is started.
Expected behavior
Both the ASP.Net Core Projects should be started.
Environment data
I used
Visual Studio Community 2015 Version 14.0.25425.01 Update 3
.I have installed Visual Studio 2015 Tooling Preview 2 of version
DotNetCore.1.0.1 - VS2015Tools.Preview2.0.2
from https://go.microsoft.com/fwlink/?LinkId=827546OS -
Windows 10 Enterprise N