microsoft / mindaro

Bridge to Kubernetes - for Visual Studio and Visual Studio Code
MIT License
307 stars 106 forks source link

VS22: Wrong overload of OnBeforeLaunchAsync called #293

Closed Snotax closed 2 years ago

Snotax commented 2 years ago

Describe the bug Whenever I want to start my Bridge in Visual Studio 2022, I get following popup and the debugger stops: image

The Bridge still starts in the background, but you don't see it. You can then start the debugger again manually and get it to work this way. There are no errors in the logs of the bridge.

The bridge also doesn't disconnect when stopping the debug process. Even thought following properties are set: image

To Reproduce Steps to follow to reproduce this issue.

Environment Details Client used (Visual Studio): VS: Visual Studio version --> 2022

Client's version: Operating System: Win 11

amsoedal commented 2 years ago

Hi @Snotax, thank you for reporting this issue. I'll make sure it gets looked at ASAP.

NCarlsonMSFT commented 2 years ago

@Snotax What type of project are you using? Also, can you check the value of LocalLaunchProfile in your .user file? This should be the name of another launch profile in the project that is used once the bridge is configured. That launch profile is most likely the one raising this error. Also, did this project work in VS 2019?

Snotax commented 2 years ago

@NCarlsonMSFT Thank you for your reply. I just found out that it works with Web (API) Projects but not with simple Console Applications. I have some console applications that function as Kafka Consumers that I'd like to debug with B2K8s.

{ "profiles": { "GT-TenantOrchestrator.Handler": { "commandName": "Project" }, "Docker": { "commandName": "Docker" }, "Bridge to Kubernetes": { "commandName": "AzureDevSpacesLocal", "launchBrowser": true } } }

I also tried changing "AzureDevSpacesLocal" to "Project", then the debugger starts, but it can't make a connection to the AKS. And yes, all my applications worked with VS2019. What I did change is the .NET version from 5 to 6.

NCarlsonMSFT commented 2 years ago

@Snotax thanks, I've been able to reproduce the issue and have started working on a fix. We hope to be able to release it next week.

NCarlsonMSFT commented 2 years ago

@Snotax this should be fixed in today's release.

Snotax commented 2 years ago

@NCarlsonMSFT Hi, thanks for the release! After some initial tests it seems to be fixed now :D Thanks!