dotnet / dotnet/aspnetcore

[Blazor] Container Support generates unnecessary Dockerfile for Client project in Interactive WebAssembly and Interactive Auto apps

Open
#68,894 2 comments 0 reactions 0 assignees View on GitHub
area-blazor
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 5h
Merged PRs (30d)
276

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

When creating a Blazor Web App with Interactive WebAssembly or Interactive Auto render modes and Container Support enabled, Visual Studio generates a Dockerfile for both the Server and Client projects.

The Client project is compiled and served by the Server project and is not intended to run as a standalone container. Therefore, generating a separate Dockerfile for the Client project appears unnecessary and may cause confusion regarding the intended containerization model.

### Expected Behavior

A Dockerfile should be generated only for the Server project.

Since the Client project is a dependency of the Server project and is not intended to run as an independent container, a separate Client-project Dockerfile should not be created.

### Steps To Reproduce

1. Open Visual Studio 2026 Insiders [12023.133] Professional.
2. Create a new Blazor Web App.
3. Select either:
> - Interactive WebAssembly
> - Interactive Auto
4. Enable Container Support.
5. Select Create.
6. If the file path error popup (#68892) appears, select OK to allow project creation to complete.
7. Examine the generated project structure.
8. Observe that a Dockerfile has been generated in:
> - The Server project folder
> - The Client project folder

### Exceptions (if any)

None.

### .NET Version

11.0.100-preview.7.26381.103

### Anything else?

**Visual Studio:** VS 2026 Insiders [12023.133] Professional
**OS:** Windows 11 Enterprise
**Evidence:**
• Interactive WebAssembly: https://github.com/BharatRamsf3693/BlazorWebApp-ContainerSupport-Validation/blob/main/ContainerSupport-On-CreationDialog/InteractiveWebAssembly/InteractiveWebAssembly.Client/Dockerfile

• Interactive Auto: https://github.com/BharatRamsf3693/BlazorWebApp-ContainerSupport-Validation/blob/main/ContainerSupport-On-CreationDialog/InteractiveAuto/InteractiveAuto.Client/Dockerfile

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in Visual Studio 2026 Insiders with Interactive WebAssembly and Interactive Auto render modes and Container Support enabled. Inspect the generated Server and Client project structures and compare the Dockerfiles linked in the report; done means each app has only a Server-project Dockerfile and no Client-project Dockerfile.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, docker
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.