-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesfeature-spaquestion
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
After creating a new AspNetCore app using the "react" template, publishing it results in a blank screen and a 404 error.
The files inside wwwroot seems to be ignored.
Expected Behavior
Starting the published app should display the react app.
Steps To Reproduce
dotnet new react -o my-appcd my-app- disable the https redirection (for local startup) :
// app.UseHttpsRedirection(); dotnet publish -c Releasedotnet .\bin\Release\net7.0\publish\my-app.dll
Exceptions (if any)
No response
.NET Version
7.0.100
Anything else?
One thing to note is that if I add an index.html in a manually created wwwroot, then disabling the csproj target that publish the spa app, the app was able to start correctly.
.NET SDK:
Version: 7.0.100
Commit: e12b7af219
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.100\
Host:
Version: 7.0.0
Architecture: x64
Commit: d099f075e4
Metadata
Metadata
Assignees
Labels
✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Resolved because the question asked by the original author has been answered.area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesfeature-spaquestion