Reputation: 1395
I get an error when upgrading the VS2015RC template to beta6 and all the dependencies in project.json to beta5.
Not sure if its related but had to remove app.UseBrowserLink(); from startup.cs to get it to compile. https://github.com/aspnet/Home/issues/719#issuecomment-118632892
I also renamed _globalimport to _viewimports, but tried both, no difference.
In startup.cs I can see the injection of the object.
IConfiguration config = Configuration.GetConfigurationSection("AppSettings");
services.Configure<AppSettings>(config);
But when the layout page has the following it errors
@inject IOptions<AppSettings> AppSettings
And the error below
An error occurred during the compilation of a resource required to process this request. Please review the following specific error details and modify your source code appropriately.
#line hidden
public ASPV__Views_Shared__Layout_cshtml()
{
}
#line hidden
[Microsoft.AspNet.Mvc.Razor.Internal.RazorInjectAttribute]
public IOptions<AppSettings> AppSettings { get; private set; }
[Microsoft.AspNet.Mvc.Razor.Internal.RazorInjectAttribute]
public Microsoft.AspNet.Mvc.Rendering.IHtmlHelper<dynamic> Html { get; private set; }
[Microsoft.AspNet.Mvc.Razor.Internal.RazorInjectAttribute]
public Microsoft.AspNet.Mvc.Rendering.IJsonHelper Json { get; private set; }
[Microsoft.AspNet.Mvc.Razor.Internal.RazorInjectAttribute]
public Microsoft.AspNet.Mvc.IViewComponentHelper Component { get; private set; }
Upvotes: 1
Views: 219