在 VS2022 Community Edition 中找不到 ADO.Net

huangapple go评论51阅读模式
英文:

Cannot find ADO.Net in VS2022 Community Edition

问题

我最近开始使用VS2022社区版版本17.4.4,之前使用了多年的VS2017企业版。我选择了ASP.Net Core Web App使用MVC后启动了一个新项目。在创建项目后,我使用Nuget导入了我需要的MS.EntityFramwork包,然后尝试添加一个新项目以选择从我的数据库中使用ADO.Net创建Entity Framework。然而,正如您可以从下面的截图看到的,包已经存在,但ADO.Net选项却没有。

虽然我找不到ADO.Net选项,但如果我需要的话,我可以选择Scaffolding,我有一种感觉这可能是我唯一的选择。我已经多次使用这种添加Entity Framework的方法,我认为在更新了我的Visual Studio之后,ADO.Net不再可用并非巧合。请有人可以确认这是否是我与SQL数据库一起工作的唯一选择,或者我是否遗漏了一些内容以访问ADO.Net。

英文:

I've recently started using VS2022 Community Edition Version 17.4.4 after using VS2017 Enterprise Edition for many years. I've started a new project after selecting ASP.Net Core Web App using MVC. After creating the project, I used Nuget to import the MS.EntityFramwork packages I need and the went to add a new item to select ADO.Net from my DB for my Entity Framework. However, as you can see from the screenshot below the packages are there but ADO.Net is not.

在 VS2022 Community Edition 中找不到 ADO.Net

Although I cannot find ADO.Net I can select Scaffolding if I want to and something tells me that is the only option available to me. I've used this process of adding Entity Framework many times and I think it's no coincidence that it isn't available after updating my Visual Studio. Can someone please confirm this is my only option to work with my SQL database or is there something I'm missing in order to access ADO.Net.

答案1

得分: 1

ADO.Net 只能与 .Net Framework 配合使用。您需要注意查看您的框架版本。如果是 .Net XXX,那么您可能创建了错误的项目,您应该创建的项目类型是 ASP.Net Web 应用程序(.Net Framework)。

如果按照上述方法仍然无法解决问题,请提出。

英文:

ADO.Net only works with .Net Framework. You can pay attention to see what your framework version is. If it is .Net XXX, it should be that you have created the wrong project, and the type of project you should create is ASP.Net Web Application (.Net Framework).

If following the methods above doesn't work, please speak up.

huangapple
  • 本文由 发表于 2023年2月19日 01:06:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/75494952.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定