Visual Studio 2022 ASP.NET 6 & Angular 13 not producing wwwroot files

875 Views Asked by At

When I add files to the wwwroot folder, they are not available in the Angular app.

For example, create a new ASP.NET Core with Angular project, and run it. The favicon.ico in wwwroot will not show in the browser. Similarly, if I put an image file in the wwwroot folder, it will not load in the angular app.

However, I can put the image in the ClientApp/src/assets folder, and then access it on assets/img.jpg.

I tried things like builder.Services.AddSpaStaticFiles(); to no avail. However, as the favicon should really work out the box, I would assume it's an issue that shouldn't require further configuration?

0

There are 0 best solutions below