0

I have this setup in project.json:

"frameworks": {
    "dnx451": { },
    "dnxcore50": { }
},

When I run the application either in Kestrel ("web" command) or in the IIS Express, how do they know which framework to use out of those 2, how does it chose .net framework or the dnx.

DavidG
  • 113,891
  • 12
  • 217
  • 223
Ilya Chernomordik
  • 27,817
  • 27
  • 121
  • 207

1 Answers1

1

For IISExpress it will use the settings in launchSettings.json in the Properties folder of the web app.

If you launch the web command using VS (ie debugging) I think it will also use settings from that file.

But if you use the web command from the command line without VS I think it will use the default runtime from your user profile as shown by the dnvm list command.

Example launchSettings.json from my project:

{
  "iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
  "applicationUrl": "http://localhost:54671/",
  "sslPort": 0
}
  },
  "profiles": {
    "IIS Express": {
  "commandName": "IISExpress",
  "launchBrowser": true,
  "environmentVariables": {
    "ASPNET_ENV": "Development"
  },
  "sdkVersion": "dnx-coreclr-win-x86.1.0.0-rc1-update1"
},
"web": {
  "commandName": "web",
  "environmentVariables": {
    "Hosting:Environment": "Development"
  },
  "sdkVersion": "dnx-coreclr-win-x86.1.0.0-rc1-update1"
}
}
}
Joe Audette
  • 35,330
  • 11
  • 106
  • 99
  • I don't have sdk version in this file at all, so I suppose this means it will use the one that is default, but I don't have any set up as default either (I guess it should be a star in dnvm list) – Ilya Chernomordik Dec 15 '15 at 15:49
  • yes I should have said the active one from your profile which may or may not also be the default one. If not specified in the launch settings I'm not sure but the global.json may also be used to determine which runtime is used. In older betas there were also settings in the web.config file in the wwwroot folder that would affect only IIS not the command line. – Joe Audette Dec 15 '15 at 15:55