title: jQuery is not available in ASP.NET Core 2.2 Razor view
body: <p>I created a simple ASP .Net Core (version 2.2) Web Application (non-MVC) in Visual Studio 2017 Community (Version 15.9.6)</p>
  
  <p>By default, jQuery (version 3.3.1) is included in the wwwroot/lib/jquery directory.  </p>
  
  <p>I am getting jQuery IntelliSense.</p>
  
  <p>jQuery is referenced in the default /Pages/Shared_Layout.cshtml file correctly.</p>
  
  <p>I added the following code to the default.csthml page:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
       $(document).ready(function () {
           $("p").click(function () {
               $(this).hide();
           });
       });
  &lt;/script&gt;
  
  &lt;p&gt;If you click on me, I will disappear.&lt;/p&gt;
  &lt;p&gt;Click me away!&lt;/p&gt;
  &lt;p&gt;Click me too!&lt;/p&gt;
  </code></pre>
  
  <p>This simple code does not work by default.</p>
  
  <p>I do not understand why.</p>
  
  <p><strong>Console Error</strong></p>
  
  <pre>0x800a1391 - JavaScript runtime error: '$' is undefined</pre>
  
  <p><strong>Markup</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt; 
  &lt;html&gt; 
  &lt;head&gt; 
      &lt;meta charset="utf-8" /&gt; 
      &lt;title&gt;@ViewData["Title"] - jQueryTest2&lt;/title&gt; 
      &lt;link rel="stylesheet" href="~/css/site.css" /&gt; 
  &lt;/head&gt; 
  &lt;body&gt; 
      &lt;header&gt;&lt;/header&gt; 
      &lt;div class="container"&gt; 
          &lt;main role="main"&gt; @RenderBody() &lt;/main&gt; 
      &lt;/div&gt; 
      &lt;footer&gt;&lt;/footer&gt; 
      &lt;environment exclude="Development"&gt; 
          &lt;script src="cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/&gt;
      &lt;/environment&gt;
  &lt;/body&gt; 
  &lt;/html&gt; 
  </code></pre>