From 50520b13bea462c0155b7f19a5f7325171efcab4 Mon Sep 17 00:00:00 2001 From: RachelAppel Date: Wed, 20 Apr 2016 18:04:34 -0400 Subject: [PATCH] environment tag helper in Working with Multiple Environments article #1028 --- aspnet/fundamentals/environments.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/aspnet/fundamentals/environments.rst b/aspnet/fundamentals/environments.rst index c3785ecd8d..bc5a34b865 100644 --- a/aspnet/fundamentals/environments.rst +++ b/aspnet/fundamentals/environments.rst @@ -72,6 +72,23 @@ For example, you can use the following code in you Configure method to setup env If the app is running in a ``Development`` environment, then it enables BrowserLink and development specific error pages (which typically should not be run in production). Otherwise, if the app is not running in a development environment, a standard error handling page is configured to be displayed in response to any unhandled exceptions. +You may need to determine which content to send to the client at runtime, depending on the current environment. A common scenario when this happens is when a developer uses full scripts and style sheets for development and debugging vs. their minified counterparts for staging or production. You can do this by setting the ``names`` attribute of the ```` Tag Helper that corresponds to the environment you want it to work in - ``Development``, ``Staging`` or ``Production``. The settings are defined in the project's debug settings (``launchSettings.json``). + +.. code-block:: html + + + + + + + + + + + Startup conventions -------------------