如何将VS 2015中的Asp.net核心EF改写为一个长尾词的?
- 内容介绍
- 文章标签
- 相关推荐
本文共计439个文字,预计阅读时间需要2分钟。
我遇到了在VS 2015下使用ASP.NET Core中EF时的问题。安装软件包后,启动项目src\CoreMVCWebAPI显示错误:This version of ASP.NET Core is not supported by Visual Studio 2015.
我遵循 ASP.NET Core – New Database在VS 2015下使用Asp.net Core中的EF.但是在安装软件包后得到以下错误.Startup project ‘src\CoreMVCWebAPI’ is an ASP.NET Core or .NET Core
project for Visual Studio 2015. This version of the Entity Framework
Core Package Manager Console Tools doesn’t support these types of
projects.
在文档中,它说,它需要VS 2017 RC,我想知道它是否在VS 2015下可用,或者是否有任何解决方法我可以在Asp.net Core或Ado.net中使用EF从SQL DataBase中检索数据.
PM> Add-Migration MyFirstMigration Invalid object passed in, ':' or '}' expected. (339): { "dependencies": { "Microsoft.NETCore.App": { "version": "1.0.1", "type": "platform" }, "Microsoft.AspNetCore.Diagnostics": "1.0.0", "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", "Microsoft.AspNetCore.Server.Kestrel": "1.0.1", "Microsoft.Extensions.Logging.Console": "1.0.0", //Dependence for MVC "Microsoft.AspNetCore.Mvc": "1.1.1", "Microsoft.AspNetCore.StaticFiles": "1.1.0", "Microsoft.Extensions.Configuration.FileExtensions": "1.1.0", "Microsoft.Extensions.Configuration.Json": "1.1.0", //Dependence for EF "Microsoft.EntityFrameworkCore":"1.1.0", "Microsoft.EntityFrameworkCore.InMemory": "1.1.0", "Microsoft.EntityFrameworkCore.SqlServer": "1.1.0", "Microsoft.EntityFrameworkCore.Tools":"1.1.0-preview4-final" //Dependence for EF with SQL, this is avalible under VS 2017 RC //"Microsoft.EntityFrameworkCore.SqlServer": "1.1.0", //Entity Framework commands to maintain the database //"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview4-final" }, "tools": { "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final" }, "frameworks": { "netcoreapp1.0": { "imports": [ "dotnet5.6", "portable-net45+win8" ] } }, "buildOptions": { "emitEntryPoint": true, //used for Razor pages which are compiled at runtime,and the compiler needs access to reference assemblies, //to make sure it compiles correctly "preserveCompilationContext": true }, "runtimeOptions": { "configProperties": { "System.GC.Server": true } }, "publishOptions": { "include": [ "wwwroot", "web.config" ] }, "scripts": { "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] } }
源代码:github.com/Edward-Zhou/DotNetCore
project.json中也不允许注释严格遵守JSON格式.有关更多信息/讨论,请参阅此公告github.com/aspnet/Announcements/issues/24和链接问题.
本文共计439个文字,预计阅读时间需要2分钟。
我遇到了在VS 2015下使用ASP.NET Core中EF时的问题。安装软件包后,启动项目src\CoreMVCWebAPI显示错误:This version of ASP.NET Core is not supported by Visual Studio 2015.
我遵循 ASP.NET Core – New Database在VS 2015下使用Asp.net Core中的EF.但是在安装软件包后得到以下错误.Startup project ‘src\CoreMVCWebAPI’ is an ASP.NET Core or .NET Core
project for Visual Studio 2015. This version of the Entity Framework
Core Package Manager Console Tools doesn’t support these types of
projects.
在文档中,它说,它需要VS 2017 RC,我想知道它是否在VS 2015下可用,或者是否有任何解决方法我可以在Asp.net Core或Ado.net中使用EF从SQL DataBase中检索数据.
PM> Add-Migration MyFirstMigration Invalid object passed in, ':' or '}' expected. (339): { "dependencies": { "Microsoft.NETCore.App": { "version": "1.0.1", "type": "platform" }, "Microsoft.AspNetCore.Diagnostics": "1.0.0", "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", "Microsoft.AspNetCore.Server.Kestrel": "1.0.1", "Microsoft.Extensions.Logging.Console": "1.0.0", //Dependence for MVC "Microsoft.AspNetCore.Mvc": "1.1.1", "Microsoft.AspNetCore.StaticFiles": "1.1.0", "Microsoft.Extensions.Configuration.FileExtensions": "1.1.0", "Microsoft.Extensions.Configuration.Json": "1.1.0", //Dependence for EF "Microsoft.EntityFrameworkCore":"1.1.0", "Microsoft.EntityFrameworkCore.InMemory": "1.1.0", "Microsoft.EntityFrameworkCore.SqlServer": "1.1.0", "Microsoft.EntityFrameworkCore.Tools":"1.1.0-preview4-final" //Dependence for EF with SQL, this is avalible under VS 2017 RC //"Microsoft.EntityFrameworkCore.SqlServer": "1.1.0", //Entity Framework commands to maintain the database //"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview4-final" }, "tools": { "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final" }, "frameworks": { "netcoreapp1.0": { "imports": [ "dotnet5.6", "portable-net45+win8" ] } }, "buildOptions": { "emitEntryPoint": true, //used for Razor pages which are compiled at runtime,and the compiler needs access to reference assemblies, //to make sure it compiles correctly "preserveCompilationContext": true }, "runtimeOptions": { "configProperties": { "System.GC.Server": true } }, "publishOptions": { "include": [ "wwwroot", "web.config" ] }, "scripts": { "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] } }
源代码:github.com/Edward-Zhou/DotNetCore
project.json中也不允许注释严格遵守JSON格式.有关更多信息/讨论,请参阅此公告github.com/aspnet/Announcements/issues/24和链接问题.

