Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 25, 2025

This PR adds Docker support to the Blazor Web App template by enabling the "Enable Docker" option when creating new projects in Visual Studio and other IDEs.

Problem

The Blazor Web App template was missing Docker support while other ASP.NET Core templates (MVC, Web API, etc.) already had this feature enabled. Users reported that when creating a new Blazor Web App, there was no option to enable Docker support during project creation, unlike other project templates.

Solution

Added the "supportsDocker": true configuration to the Blazor Web App template's IDE host configuration file. This follows the exact same pattern used by all other web project templates in ASP.NET Core.

Files Changed:

  • src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/.template.config/ide.host.json

The change is minimal and surgical - adding just one line to enable Docker support in the template configuration without modifying any generated project code or functionality.

Verification

  • Template builds successfully without errors
  • Project creation works correctly with dotnet new blazor
  • JSON configuration is syntactically valid
  • Change is consistent with all other web templates that support Docker
  • No impact on existing functionality - only enables the Docker option in IDEs

This brings the Blazor Web App template in line with other ASP.NET Core project templates and addresses the feature gap reported in the issue.

Fixes #issue_number

Original prompt

This section details on the original issue you should resolve

<issue_title>Add Docker support to Blazor Web App template</issue_title>
<issue_description>We should have the "Enable Docker" option on the Blazor Web App template.</issue_description>

<agent_instructions>Follow the same pattern in https://github.com/dotnet/aspnetcore/tree/main/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp to add docker support to the BlazorWeb template</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@danroth27 > @danroth27 would this also affect adding docker support to a template after creation? I created a Blazor Web App, right clicked on the project, clicked add docker support. App won't run, indicates the ` Client\....\wwwroot` wasn't found. I assume this is related, but if not, perhaps it's another issue.

@codymullins This might be an issue with the Docker tooling Visual Studio. Could you please open a Visual Studio feedback ticket for this?

@danroth27 > Will do. Do you happen to have a sample of a working .NET 8 Blazor Web App with Docker so I can share that and compare to what is auto-generated?

I don't have a .NET 8 version, but you could try comparing with a Docker enabled ASP.NET Core hosted Blazor WebAssembly app using .NET 7. Using VS 17.7 create a new Blazor WebAssembly App with the ASP.NET Core hosted and Docker options enabled. That should work.</comment_new>
<comment_new>@
Thanks for contacting us.

We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.</comment_new>
<comment_new>@danroth27

@mkArtakMSFT Would like to know if we plan to support this for .NET 9? Otherwise, we will look for it when we get to .NET 10.

@v-elenafeng We don't plan to add this template option for .NET 9, but you should be able to Add Docker a Blazor Web App after the project is created using the Visual Studio tooling: Right click on project > Add > Docker Support.</comment_new>

Fixes #49889

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Add Docker support to Blazor Web App template Add Docker support to Blazor Web App template Sep 25, 2025
Copilot finished work on behalf of javiercn September 25, 2025 10:17
@Copilot Copilot AI requested a review from javiercn September 25, 2025 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Docker support to Blazor Web App template
2 participants