简体   繁体   English

在 Visual Studio 中选择 LocalDB 版本

[英]Choose LocalDB version in Visual Studio

I'm developing a project in VS2022 with EF6, using localDB as default instance.我正在使用 EF6 在 VS2022 中开发一个项目,使用 localDB 作为默认实例。

My DB is being created code-first and since I have multiple versions of localDB installed, for a matter of compatibility, I wanted the database was created using the 2014 (12.0. 4100.1) version.我的数据库是代码优先创建的,因为我安装了多个版本的 localDB,为了兼容性,我希望数据库是使用 2014 (12.0.4100.1) 版本创建的。 But it is always created in the 2019 version of LocalDB.但它始终是在 2019 版本的 LocalDB 中创建的。

Is there any way to specify the LocalDB Version in the project before the DB creation or at any other point?有没有办法在创建数据库之前或在任何其他时间点在项目中指定 LocalDB 版本?

Use SQL Server Express instead and pick the desired installer请改用 SQL Server Express 并选择所需的安装程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM