1

Where are my output DLLs when publishing an ASP.NET 5 web application?

When running the MSBuild's FileSystemPublish, the publish directory looks something like this:

  • approot folder: packages, runtime and source code
  • wwwroot folder: web.config and AspNet.Loader.dll
  • web
  • web.cmd

MSBuild.exe "C:/MyApplication/MyProj.xproj" /t:Build,FileSystemPublish /p:PublishConfiguration=Release /p:PublishOutputPathNoTrailingSlash="C:/a/MyApplication"

From the logging output I can see that dnu publish is called:

dnu publish "C:/MyApplication" --out "C:/a/MyApplication" --configuration Release --runtime dnx-clr-win-x86.1.0.0-beta6 --quiet

If I look inside web.cmd I can see that DNX is indeed running the application from source code:

@"%~dp0approot\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnx.exe" --appbase "%~dp0approot\src\MyApplication" Microsoft.Framework.ApplicationHost web %*

I am able to point IIS to the wwwroot directory with success.

How does IIS know to call on web.cmd? Is this the correct approach to serving up an ASP.NET 5 application in a production environment?

Dave New
  • 38,496
  • 59
  • 215
  • 394

2 Answers2

3
  1. IIS doesn't call web.cmd. IIS knows how to load AspNet.Loader from the wwwroot folder.
  2. In a production environment you probably don't want to compile from sources because the startup is pretty slow. You should publish precompiled binaries. You do that by passing --no-source to dnu publish:

dnu publish "C:/MyApplication" --out "C:/a/MyApplication" --configuration Release --runtime dnx-clr-win-x86.1.0.0-beta6 --no-source

Victor Hurdugaci
  • 28,177
  • 5
  • 87
  • 103
1

The question is obsolete

According to the latest community standup (see Announcement), the HELIOS integration between IIS and asp.net 5 was stopped. Ongoing the only server provided by MS is kestrel. IIS will natively not recognize DNX projects.

You have to start and integrate kestrel into IIS by reverse proxying it using the HttpPlatformHandler (IIS8+).

Thomas
  • 5,080
  • 27
  • 42