Static resources cannot be loaded in Production environment
joestr opened this issue · comments
Joel Strasser commented
Describe the bug
Static resources under the _content
path cannot be loaded.
To Reproduce
- Clone latest version of bagetter\BaGetter.git
- Navigate to
src/BaGetter
- Compile
- Navigate to
bin/Release/net6.0
- Start with
dotnet BaGetter.dll
- Open browser and navigate to
http://localhost:5000
- See that no style sheets were loaded
Expected behavior
Static resources should be loaded.
Screenshots
Additional context
Running the application from VisualStudio or Rider does not cause a problem
A workaround is exporting an environment variable ASPNETCORE_ENVIRONMENT
with value of Development
.
Joel Strasser commented
Ok, I found the error. I mistakenly deployed only the release of the build and not the output from dotnet publish