none
Why environments tag does not work on .net core 3? RRS feed

  • Question

  • I want to use environment tag on my view, just create a simple project and added bellow codes on my view header, but when I run, it loads both CSS files, Why? I mean my machine have product environment variable and because of it it must just load second .min.css file not both.

    I tested my machine environment  when I run .exe file on my project path "\bin\Debug\netcoreapp3.0" and its " Hosting environment: Production", then what is wrong?

        <environment include="Development">
            <link rel="stylesheet" href="~/css/StyleSheet1.css" />
        </environment>

        <environment exclude="Development">
            <link rel="stylesheet" href="~/css/StyleSheet1.min.css" asp-append-version="true" />
        </environment>

    On chrome inspector:



    It must not load both processed CSS and unprocessed CSS files at the same time, am I wrong?


    Sunday, November 3, 2019 7:34 AM

All replies

  • Hi Motevalizadeh,

    Sorry for delay in reply.

    Based on your description, this issue is more related to .net core development, and I'm sorry that it is beyond our support, we recommend you could redirect to asp.net core forum, and you could get dedicated support there.

    Thank you for understanding.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, November 4, 2019 9:24 AM