Skip to content

.NET 8 lost the availability to change web root content folder when using Web Publishing? #47927

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

Open
karanokara opened this issue Mar 27, 2025 · 1 comment
Labels
Area-WebSDK untriaged Request triage from a team member

Comments

@karanokara
Copy link

Is your feature request related to a problem? Please describe.

By default, when publishing an ASP.NET application to a remote server, the frontend static files will be copied to \wwwroot folder.

In ASP.NET 6, I can change this remote folder when publishing by using this in my project .csproj

Here will using \Public folder rather than the default \wwwroot

<ItemGroup>
  <DistFiles Include="$(SpaRoot)build\**" />
  <ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
    <RelativePath>Public\%(RecursiveDir)%(FileName)%(Extension)</RelativePath>
    <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
    <ExcludeFromSingleFile>true</ExcludeFromSingleFile>
  </ResolvedFileToPublish>
</ItemGroup>

In .NET 8, it separated the client project using .esproj and server project .csproj, and there is no configuration to modify this setting.

Describe the solution you'd like

There may be a solution there but I can't find out, but if not, could consider having it in the future?

Additional context

I am using ASP.NET 8 with React project on Windows 10
Application is published to remote Windows server 2019 via Web Deploy using Visual Studio 2022

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-WebSDK untriaged Request triage from a team member labels Mar 27, 2025
@sundayScoop
Copy link

Same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-WebSDK untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

2 participants