The Wayback Machine - https://web.archive.org/web/20220211163706/https://github.com/dotnet/aspnetcore/issues/40146
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blazor WASM Environnement issue #40146

Open
1 task done
Julien-Marpault opened this issue Feb 11, 2022 · 0 comments
Open
1 task done

Blazor WASM Environnement issue #40146

Julien-Marpault opened this issue Feb 11, 2022 · 0 comments

Comments

@Julien-Marpault
Copy link

@Julien-Marpault Julien-Marpault commented Feb 11, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I have a blazor Wasm hosted project.

Environnements are not working as expected:

Queries contains Blazor environment header : blazor-environment: Development
but appsettings files are not loading accordingly. Only base appsettings file is loading.

I have to force environnement with

    <script>
        Blazor.start({
            environment: "Development"
        });
    </script>

to have my appsettings files loading correctly.

Although I tried to display Environment in my web page.
When the environnement is forced by Startup script I see Development, so it's fine.
But When I let blazor-environment header determine the environment, I see Development, Development

I noticed something weird with
blazor.webassembly.js:
image

blazor.boot.json
image

and donet.js
image

It should be the explanation of the issue.

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

6.0.102

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant