Base solution for your next web application
Open Closed

Env Variable problem & Missing min.js files #3797


User avatar
0
ervingayle created

I notice that setting my ASPNETCORE_ENVIRONMENT to Production or Development does not have any effort on the developer error pages. What am I doing wrong here? I am setting this value on the MVC project where it is located.

Secondly, I am trying to test out the DemoUIComponents functionality and noticed that I am missing all of the min.js files. Looking at the path in the solution does not show them created. Although I have the minifier and bundler plugins for VS 2017 installed. Is this done automatically?


2 Answer(s)
  • User Avatar
    0
    ervingayle created

    I did some more research and I am not clear now the aspnet environment variable is being read/referenced.

    There is a Microsoft article that references add the setting to your web.config as follows and this seems to work so far. <environmentVariables> <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" /> </environmentVariables>

    I installed the Web Essentials plug-in and used the bundle and minify option there. My only issue here is that when the .min.js files are created, the files do not show in the bower folder path for that plug-in when the bower packages are stored upon project startup.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @ervingayle,

    You need to change ASPNETCORE_ENVIRONMENT in Propreties/launchSettings.json. Bower sometimes can have such problems, can you try to close/open your solution and see if it works ?

    Thanks.