title: Asp.net MVC5 WebRole after deployed to Azure Cloud, breaks on @Scripts.Render
body: <p>I have a cloud service with an Asp.Net MVC 5 Web Role and Azure SDK 2.3 targeting 4.5.1 framework; The website works perfectly in Local.
  But when I deploy it to Azure Cloud service, I have the classic null reference error:</p>
  
  <p>Object reference not set to an instance of an object. 
  Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.</p>
  
  <p>Source Error: </p>
  
  <pre><code>Line 9:      @Scripts.Render("~/bundles/jquery")
  </code></pre>
  
  <p>My BundleConfig.cs is simple:</p>
  
  <pre><code>    public static void RegisterBundles(BundleCollection bundles)
      {
          bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                       "~/Scripts/jquery-{version}.js",
                       "~/Scripts/knockout-{version}.js",
                       "~/Scripts/jquery.signalR-{version}.js",
                       "~/Scripts/modernizr-{version}.js"
                      ));
  </code></pre>
  
  <p>Using Intellitrace Logs on the WebRole I can see this error:</p>
  
  <blockquote>
    <p>invalid file name for file monitoring 'E:\sitesroot\0\Scripts</p>
  </blockquote>
  
  <p>Entering remotely in the instance I see that the folder Scripts is exactly in that path.</p>
  
  <p>Removing the @Script.Render the page load normally.
  The @Style.Render on the same page works.</p>
  
  <p>I tried to deploy in Debug mode, and Release mode, both in Staging.</p>
  
  <p>Also tried to change in Web.config the </p>
  
  <pre><code>compilation debug="true" and false
  </code></pre>
  
  <p>with no success.
  Any ideas why could happen this?
  Thanks</p>