No. You said you can target .Net 4.5 in ASP.NET but that isn't exactly accurate you can target dnx451 which is .Net Full Framework 4.5.1 + DNX.
DNX is not "installed" in the same fashion as .Net Framework. It isn't really an installation more like an xcopy. DNVM simply downloads a specific copy of the DNX and puts it into a folder under c:\Users\.dnx\runtimes. If you didn't want to use dnx you could just copy the folder. When an application references a specific version of the runtime it just calls dnx.exe within the correct folder by convention
c:\Users\<User>\.dnx\runtimes\<dnx-runtimetype-os-architecture.version>\bin\dnx.exe
If you want to even avoid a separate step the --runtime
option in dnu publish
will include a copy within the application folder structure /approot/runtimes by taking a copy from the local dev machine. Neil's answer provides more details. It avoids the requirement of installing the dnx separately but the dnx is still used. Using --no-source
is not necessary and independent of decision to bundled the runtime with the application.
In case you are wondering how does IIS "find" the dnx to begin execution, when you publish the project a project is included in /wwwroot/bin/AspNetLoader.dll. This provides an entry point for IIS. Also a small web.config is also included which provides the location to the dnx executable.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="bootstrapper-version" value="1.0.0-beta4" />
<add key="runtime-path" value="..\approot\runtimes" />
<add key="dnx-version" value="1.0.0-beta6-12120" />
<add key="dnx-clr" value="coreclr" />
<add key="dnx-app-base" value="..\approot\src\AspDotNetFiveDemo.Web" />
</appSettings>
</configuration>
This 'bootstrap' is really only to provide backwards compatibility with IIS. It isn't used in other environment. For example if self hosting using http.sys DNX.exe is just called directly and provided the assemblies and parameters.
dnu build
and/ordnu publish
? – Arrow