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
Today I want to write a small addition to my post from yesterday. As I mentioned yesterday to reference some content inside your razor views you need to use a path similar to _content/{LIBRARY NAME}.
This path doesn’t look so nice. Luckily you change it to a different path name by editing the RCL project properties and adding a StaticWebAssetBasePath.
Now you can access your files using /myownpath/example.css.