Skip to content

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

Description

@BharatRamsf3693

Is there an existing issue for this?

  • 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
  1. Enable Container Support.
  2. Select Create.
  3. If the file path error popup ([Blazor] Creating Interactive WebAssembly or Auto apps with Container Support triggers missing launchSettings.json error popup #68892) appears, select OK to allow project creation to complete.
  4. Examine the generated project structure.
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Components

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions