Linked files in wwwroot results in "More than one compatible asset found for" error.
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
When linking to files in another project, such as appsettings.json, and then placing these linked files in the Blazor WASM's wwwroot project, a build error occurs with this message: **C:\Program Files\dotnet\sdk\7.0.302\Sdks\Microsoft.NET.Sdk.Razor\targets\Microsoft.NET.Sdk.Razor.StaticWebAssets.Pack.targets(128,5): error : More than one compatible asset found for.**
When moving the linked files out the wwwroot folder, the build completes successfully. Unfortunately, the appsettings.json file must exist in the wwwroot folder. Here is an extract from the .csproj file to make this more clear.
```
```
### Expected Behavior
The project builds successfully as if the linked files were actual files in the Blazor WASM project.
### Steps To Reproduce
_No response_
### Exceptions (if any)
_No response_
### .NET Version
7.0.302
### Anything else?
```
Contributor guide
Assessment
This issue has not been assessed yet.