Can multiple projects in a Visual Studio solution work with dev tunnels?

John Mann 41 Reputation points
2024-06-18T08:54:53.01+00:00

I have a solution with multiple startups - it looks like Visual Studio tries to assign a dev tunnel to both projects but only the first works, the second says it can't connect to the URL. Does anyone know if this is possible and if so how to make it happen?

I'm using .net core 6 in both projects, also Visual Studio 2022.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,841 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,110 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 30,566 Reputation points Microsoft Vendor
    2024-06-19T02:57:10.09+00:00

    Hello @John Mann,

    Welcome to Microsoft Q&A forum.

    Please kindly check the explanation here: Specify the active tunnel

    A project or solution can have multiple tunnels, but only one at a time is active. The Dev Tunnels flyout in the debug dropdown can specify the active tunnel. When there is an active tunnel, it’s used for all ASP.NET Core projects that are started in Visual Studio. Once a tunnel is selected as active, it remains active until Visual Studio is closed.

    So, only one tunnel at a time is active, and it should be used for all started projects. Maybe try to launch VS and run your projects again? Also, not very sure how you selected/configured the tunnel, perhaps you need to follow the related documents and check/configure again.

    Sincerely,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. John Mann 41 Reputation points
    2024-08-19T10:05:56.9266667+00:00

    After upgrading to a later version of Visual Studio (I'm now on 17.11.0) I no longer see this problem, so it all appears to be working ok now - thanks for your patience.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.