I’ll continue my journey using Razor Class Libraries in ASP.NET Core.
Here are my previous posts:
- ASP.NET Core – Razor Class Libraries
- Razor Class Libraries - Views not found
- Razor Class Libraries – Static Content
- Razor Class Libraries – Clean up your Content path
Today I want to share an issue a colleague got when he tried to use a Razor Class Library I created.
When he tried to load a static asset from the RCL, the asset was not found and a 404 error was returned to the browser.
It took me a while to pinpoint the issue but in the end it turned out that the following setting in his ASP.NET Core project caused the problem:
<ANCMPreConfiguredForIIS>true</ANCMPreconfiguredForIIS>
After commenting out this line in the csproj file, the static assets were loaded correctly
I have no clue why this solved the problem as I don’t see any relation between these features…