title: View not found after publish to Azure
body: <p>I have created an ASP.NET MVC Core project and registered some custom folders to search for Views. I did this with a custom <code>IViewLocationExpander</code> class like this:</p>
  
  <pre><code>public class AppsViewLocationExpander : IViewLocationExpander
  {
    public IEnumerable&lt;string&gt; ExpandViewLocations(ViewLocationExpanderContext context, 
                                                 IEnumerable&lt;string&gt; viewLocations)
    {
      yield return "/MyViewLocation/A/Views";
      //and so on...
    }
  </code></pre>
  
  <p>And used this class in <em>Startup.cs</em>:</p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {
      services.AddMvc();
      services.Configure&lt;RazorViewEngineOptions&gt;(options =&gt;
      {
          options.ViewLocationExpanders.Add(new AppsViewLocationExpander());
      });
  }
  </code></pre>
  
  <p>Inside the <em>MyViewLocation/A/Views</em> folder are some <em>*.cshtml</em> files and a local debug session proceeded <strong>without any error</strong>.
  Now I published the web app to Azure, and I got a 500 Internal Server Error. I Attached Visual Studio to debug this error and got this message:</p>
  
  <blockquote>
    <p>System.InvalidOperationException: The view 'Index' was not found. The following locations were searched:<br>
    /MyViewLocation/A/Views/Index.cshtml</p>
  </blockquote>
  
  <p><strong>What did I wrong?</strong> Do I have to add the Views-Folder in some other place too?</p>
  
  <p><strong>EDIT</strong>:<br>
  I modified my <em>project.json</em> at my initial setup, but this does not help with my Azure problem. But probably it was necessary to find the views during my local debugging.</p>
  
  <pre><code>"publishOptions": {
    "include": [
      "wwwroot",
      "Views",
      "Areas/**/Views",
      "MyViewLocation/**/Views",
      "appsettings.json",
      "web.config"
    ]
  },
  </code></pre>
  
  <p><strong>EDIT 2</strong>:<br>
  I uploaded manually the <em>*.cshtml</em> files onto the FTP server. Nevertheless They are still not found.</p>