I’ve updated my project from .NET 5 RC 1 to RC 2 and it doesn’t build anymore.

This is by design. There are two assets that would end on the same “publish path” in the final project. The recommendation is that you choose which file you want to “win” and remove the other file.

I removed it from the client and it now builds fine.

If they are different files and you need them both, it is likely that you were never loading the one in your client/wwwroot since the one in server/wwwroot would “silently win” so you should decide whether you need both or if the server one is just a copy, then avoid that all together and remove it since client/wwwroot is the original one.

Error:

The static web asset 'xxxxx\Client\wwwroot\favicon.ico' has a conflicting web root path '/wwwroot/favicon.ico' with the project file 'wwwroot\favicon.ico'.

Fix:

Remove the “favicon.ico” file in the <MyApp>.Server and keep the one in <MyApp>.Client.

Note: The favicon.ico is the icon that get shown when you install the PWA app. This file needs to be in the Client project and not in the Server project.

Sources:

https://github.com/dotnet/aspnetcore/issues/26974

Last modified: June 7, 2021

Author

Comments

Write a Reply or Comment