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

  • Thread starter Thread starter Motevalizadeh
  • Start date Start date
M

Motevalizadeh

Guest
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:

1499820.png

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

Continue reading...
 
Back
Top