Mark Cooper
Mark Cooper

Reputation: 6894

Published Blazor application not using appsetting.Release.json

I have published my Blazor application to local IIS using Release configuration settings.

I have an appsettings.Release.json file which is included in the published folder, but the values in appsettings.Release.json are not being used in the published application.

I have already added ASPNETCORE_ENVIRONMENT value to Release for ApplicationHost.Config in the respective IIS Website.

enter image description here

How do I set the published application to "Release"?

Upvotes: 0

Views: 750

Answers (1)

Mark Cooper
Mark Cooper

Reputation: 6894

Arghhh... In IIS I had configured my variable name with a space at the end...

ASPNETCORE_ENVIRONMENT was changed to ASPNETCORE_ENVIRONMENT and now all is working correctly.

[Facepalm]

Upvotes: 4

Related Questions