1

VS2015RC テンプレートを beta6 にアップグレードし、project.json のすべての依存関係を beta5 にアップグレードすると、エラーが発生します。

関連するかどうかはわかりませんが、app.UseBrowserLink(); を削除する必要がありました。startup.cs から取得してコンパイルします。 https://github.com/aspnet/Home/issues/719#issuecomment-118632892

また、_globalimport の名前を _viewimports に変更しましたが、両方を試してみましたが、違いはありませんでした。

startup.cs で、オブジェクトの挿入を確認できます。

IConfiguration config = Configuration.GetConfigurationSection("AppSettings");
services.Configure<AppSettings>(config);

しかし、レイアウトページに次のようなものがあるとエラーになります

@inject IOptions<AppSettings> AppSettings

そして、以下のエラー

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&lt;AppSettings&gt; AppSettings { get; private set; }
    [Microsoft.AspNet.Mvc.Razor.Internal.RazorInjectAttribute]
    public Microsoft.AspNet.Mvc.Rendering.IHtmlHelper&lt;dynamic&gt; 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; }
4

0 に答える 0