From cacb1b8ed07ffc5a0539074b484e59a0381243a2 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Thu, 7 Nov 2019 13:42:18 -0600 Subject: [PATCH] Surface project item to control static asset publishing (#15584) --- aspnetcore/fundamentals/index.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/aspnetcore/fundamentals/index.md b/aspnetcore/fundamentals/index.md index a4692ce153..c883e4e9ab 100644 --- a/aspnetcore/fundamentals/index.md +++ b/aspnetcore/fundamentals/index.md @@ -5,7 +5,7 @@ description: Learn the foundational concepts for building ASP.NET Core apps. monikerRange: '>= aspnetcore-2.1' ms.author: riande ms.custom: mvc -ms.date: 10/07/2019 +ms.date: 11/07/2019 uid: fundamentals/index --- # ASP.NET Core fundamentals @@ -297,6 +297,14 @@ The web root path defaults to *{content root}/wwwroot*, but a different web root ::: moniker-end +Prevent publishing files in *wwwroot* with the [\ project item](/visualstudio/msbuild/common-msbuild-project-items#content) in the project file. The following example prevents publishing content in the *wwwroot/local* directory and sub-directories: + +```xml + + + +``` + In Razor (*.cshtml*) files, the tilde-slash (`~/`) points to the web root. A path beginning with `~/` is referred to as a *virtual path*. For more information, see .