2016-02-28 64 views
4

我在Visual Studio中的視圖文件夾中查看視圖類中的錯誤(請參見圖像)。 我使用 ASP.net(5) (現在).NET核心1.0 MVC核心1.0 .. Project.json(.NET Core 1.0 && net46)Visual Studio中的視圖類中的MVC錯誤

{ 
    "userSecretsId": "OIDD", 
    "root": "wwwroot", 
    "commands": { 
     "ef": "Microsoft.EntityFrameworkCore.Commands", 
     "web": "OIDD" 
    }, 
    "compilationOptions": { 
     "emitEntryPoint": true, 
     "preserveCompilationContext": true 
    }, 
    "dependencies": { 
     "Microsoft.AspNetCore.Authentication.Cookies": "1.0.0-rc2-16411", 
     "Microsoft.AspNetCore.Authentication.JwtBearer": "1.0.0-rc2-*", 
     "Microsoft.AspNetCore.Diagnostics": "1.0.0-*", 
     "Microsoft.AspNetCore.Hosting": "1.0.0-*", 
     "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0-*", 
     "Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-rc2-16281", 
     "Microsoft.AspNetCore.Mvc": "1.0.0-rc2-17119", 
     "Microsoft.AspNetCore.Mvc.Razor": "1.0.0-rc2-17119", 
     "Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0-rc2-17119", 
     "Microsoft.AspNetCore.Razor": "1.0.0-rc2-16282", 
     "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-16453", 
     "Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-16290", 
     "Microsoft.AspNetCore.Tooling.Razor": "1.0.0-rc2-16160", 
     "Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc2-16100", 
     "Microsoft.Extensions.Configuration.Json": "1.0.0-*", 
     "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc2-16097", 
     "Microsoft.Extensions.Logging": "1.0.0-rc2-16120", 
     "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-*", 
     "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-*", 
     "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc2-16389", 
     "Microsoft.AspNetCore.DataProtection": "1.0.0-rc2-16137", 
     "Microsoft.AspNetCore.MiddlewareAnalysis": "1.0.0-rc2-16618", 
     "Microsoft.EntityFrameworkCore": "1.0.0-rc2-16854", 
     "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0-*", 
     "OpenIddict.Core": "1.0.0-*", 
     "OpenIddict.EF": "1.0.0-*" 
    }, 
    "exclude": [ 
     "wwwroot", 
     "node_modules" 
    ], 
    "frameworks": { 
     "net46": { } 
    }, 
    "publishExclude": [ 
     "**.user", 
     "**.vspscc" 
    ], 
    "version": "1.0.0-*", 
    "tools": { 
     "dotnet-publish-iis": "1.0.0-*", 
     "dotnet-razor-tooling": "1.0.0-*" 
    }, 
    "content": [ 
     "Areas", 
     "Views", 
     "wwwroot", 
     "hosting.json", 
     "config.json" 
    ] 
    } 

Errors | Project Hierarchy and Errors in Editor

編輯:編輯問題之後更好地理解這個問題

+2

它抱怨ASPNET因爲包和命名空間已更名爲AspNetCore,你還在使用ASPNET的。我會建議堅持rc1-final,除非你真的知道你在做什麼。有了rc2,你應該考慮使用dotnet而不是dnx,因爲dnx正在消失。工具還沒有準備好rc2。 – Pawel

回答