asp.net-core – VS 2015中的Asp.net核心EF
发布时间:2020-12-16 09:13:22 所属栏目:asp.Net 来源:网络整理
导读:我遵循 ASP.NET Core – New Database在VS 2015下使用Asp.net Core中的EF.但是在安装软件包后得到以下错误. Startup project ‘srcCoreMVCWebAPI’ is an ASP.NET Core or .NET Core project for Visual Studio 2015. This version of the Entity Framework
我遵循
ASP.NET Core – New Database在VS 2015下使用Asp.net Core中的EF.但是在安装软件包后得到以下错误.
在文档中,它说,它需要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%" ] } } 源代码:https://github.com/Edward-Zhou/DotNetCore 解决方法
您无法在CSproj(Visual Studio 2015)项目中使用MSBuild(Visual Studio 2017)包.如果你将Microsoft.EntityFrameworkCore.Tools版本从1.1.0-msbuild3-final更改为例如1.1.0-preview4-final它应该工作
project.json中也不允许注释严格遵守JSON格式.有关更多信息/讨论,请参阅此公告github.com/aspnet/Announcements/issues/24和链接问题. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- IdentityServer4 QuickStart 授权与自定义Claims
- webforms – ASP.NET Web窗体(4.5)强类型模型绑定 – ListV
- asp.net – 实体框架:坚持在多对多添加新实体,而不是重新使
- asp.net-mvc – 我可以在asp.net mvc中结束视图的渲染吗?
- iis-7 – 使用ASP.NET MVC3,如何在区分大小写的路由中使IIS
- ASP.NET Core 企业开发架构概述
- asp.net-web-api – 用于IONIC2应用程序和Identity Server4
- 深度探秘.NET 5
- asp.net – 获取数据绑定到ListView上DataBound事件
- asp.net – 使用basicHttpBinding时无法识别的属性’transa
推荐文章
站长推荐
- 调试 – 如何调试经典ASP?
- asp.net-mvc-3 – 是否可以设置TextBoxFor生成的
- 如何自定义ASP.NET Web API AuthorizeAttribute的
- Visual Studio对程序集签名时一个很不好用的地方
- ASP.NET MVC配置客户端单点登录CAS
- asp.net-core-signalr – SignalR Core中的SendA
- asp.net – 在Gridview中有条件地隐藏CommandFie
- asp.net – Linq’包含’查询耗时太长
- asp.net-mvc – Asp.Net核心MVC6如何最初在Ident
- ASP.NET全球化:Culture =“auto”页面指令,中性
热点阅读