-
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.Status: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentsquestion
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Files linked are not served when you run the project locally
<ItemGroup>
<None Include="..\cv.Common\Data\**\*">
<Link>wwwroot\Data\%(RecursiveDir)/%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
When i try to access any file inside the Data folder it returns a 404 error, if i access a file that is not linked like app.css it works correctly.
Expected Behavior
It is supposed to serve static files when they are on the publish|bin output even if they are linked or normal files
Steps To Reproduce
Just create a sample Blazor project, try to link any file like this
<ItemGroup>
<None Include="..\cv.Common\Data\**\*">
<Link>wwwroot\Data\%(RecursiveDir)/%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
and try to access it http://localhost:5000/filename.txt
Exceptions (if any)
No response
.NET Version
7.0.100-preview.7.22377.5
Anything else?
Tried running it on Visual Studio,Rider and dotnet watch, all of them have the same behaviour
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.Status: Resolvedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentsquestion