bagetter/BaGetter

Static resources cannot be loaded in Production environment

Closed this issue · 1 comments

Describe the bug

Static resources under the _content path cannot be loaded.

To Reproduce

  1. Clone latest version of bagetter\BaGetter.git
  2. Navigate to src/BaGetter
  3. Compile
  4. Navigate to bin/Release/net6.0
  5. Start with dotnet BaGetter.dll
  6. Open browser and navigate to http://localhost:5000
  7. See that no style sheets were loaded

Expected behavior

Static resources should be loaded.

Screenshots

image

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.

Ok, I found the error. I mistakenly deployed only the release of the build and not the output from dotnet publish