Suppress modal toast for Generate Assets command when Container Tools extensions are present #8509
+474
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When C# Dev Kit is installed, the extension shows a modal warning that recommends against using the ".NET: Generate Assets for Build and Debug" command in favor of dynamic debugging configurations. However, containerized debugging scenarios require static task configurations and cannot use the dynamic tasks from C# Dev Kit, leading to user confusion.
This PR implements a solution that automatically suppresses the modal toast when container tools extensions are detected:
ms-azuretools.vscode-docker
)ms-vscode-remote.remote-containers
)Implementation
The solution adds a new utility function
hasContainerToolsExtension()
that checks for the presence of container-related extensions. The existingpromptForDevKitDebugConfigurations()
function in the debugger has been enhanced to skip showing the modal when container tools are present.Additionally, a new configuration option
dotnet.server.suppressGenerateAssetsWarning
has been added to allow manual suppression of the modal for edge cases or other scenarios where static debugging configurations are required.Behavior Changes
Benefits
The implementation is designed to be easily extensible to support additional container-related extensions in the future.
Fixes #8414.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.