Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to debug a Console project #4369

Closed
Tracked by #4394 ...
v-meilei opened this issue Aug 21, 2024 · 3 comments
Closed
Tracked by #4394 ...

Fail to debug a Console project #4369

v-meilei opened this issue Aug 21, 2024 · 3 comments

Comments

@v-meilei
Copy link

OS: Mac M1/Linux
Build Version: v1.29.2
Docker Desktop App Version: 4.34

Repro Steps:

  1. Create and open a .NET 9.0/8.0 Console project in VS Code, make sure it doesn't have 'launch.json' file.
  2. F5 -> Select 'Docker: Debug in Container' -> Select 'Use .NET SDK'.
  3. Check whether succeeds to debug.

Expect:
Succeed to debug.

Actual:
An error occurs.
image

More Info:
This issue doesn't reproduce when debugging .Net 9.0/8.0 MVC Project.

@bwateratmsft
Copy link
Collaborator

I am able to reproduce.

@bwateratmsft
Copy link
Collaborator

It looks like maybe the property EnableSdkContainerSupport is required to be set to true, confirming with Chet.

@bwateratmsft
Copy link
Collaborator

Ok, confirmed. For all console apps, you need to add <EnableSdkContainerSupport>true</EnableSdkContainerSupport> to a property group in the CSPROJ file. I have updated the test case instructions to note that.

@microsoft microsoft locked and limited conversation to collaborators Oct 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants