我在Visual Studio中的Views文件夹(请参阅图像)中的Views类中出现错误。
我正在使用 ASP.net(5)(现在).NET Core 1.0 MVC核心1.0 ..
Project.json
{
"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
编辑:在更好地理解问题后编辑问题