简体   繁体   English

包安装错误 - 实体框架

[英]Package Installation Error - Entity Framework

The error occurs when I'm trying to create ADO.NET Entity Data Model. 当我尝试创建ADO.NET实体数据模型时发生错误。 The error says: 错误说:

The preinstalled packages have a reference to a missing Registry value. 预安装的软件包引用了缺少的注册表值。 Could not find a Registry key with name 'EntityFrameworkVisualStudio14Tools' under 'SOFTWARE\\NuGet\\Repositoty'. 在'SOFTWARE \\ NuGet \\ Repositoty'下找不到名为'EntityFrameworkVisualStudio14Tools'的注册表项。

I'm using Windows 10, Visual Studio 2015, and tried to install Entity Framework 6.1.3 我正在使用Windows 10,Visual Studio 2015,并尝试安装Entity Framework 6.1.3

I wasted a whole weekend on this issue. 我在这个问题上浪费了整整一个周末。 I ended up resolving it by going into the registry under \\HKEY_CURRENT_USER\\Software\\NuGet\\Repository and made a new key titled EntityFrameworkVisualStudio14Tools and set the data value to 1. Hope this keeps other people from wasting a bunch of time like I did. 我最终通过进入\\ HKEY_CURRENT_USER \\ Software \\ NuGet \\ Repository下的注册表来解决它,并创建了一个名为EntityFrameworkVisualStudio14Tools的新密钥并将数据值设置为1.希望这可以让其他人像我一样浪费一大堆时间。

In my case the string EntityFrameworkVisualStudio15Tools was missing but instead EntityFrameworkVisualStudio16Tools was there. 在我的情况下,字符串EntityFrameworkVisualStudio15Tools丢失了,而是EntityFrameworkVisualStudio16Tools在那里。 I guess because I also installed Visual Studio 2019, but I'm currently working in Visual Studio 2017. Registry Path on a 64 bit Windows: 我想因为我也安装了Visual Studio 2019,但我目前正在使用Visual Studio 2017. 64位Windows上的注册表路径:

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Nuget\Repository

Solution: I created the string EntityFrameworkVisualStudio15Tools and copied the value from EntityFrameworkVisualStudio16Tools which was in my case: 解决方案:我创建了字符串EntityFrameworkVisualStudio15Tools并复制了EntityFrameworkVisualStudio16Tools中的值,这是我的情况:

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Entity Framework Tools\NuGet Packages\

The preinstalled packages have a reference to a missing Registry value. 预安装的软件包引用了缺少的注册表值。 Could not find a Registry key with name 'EntityFrameworkVisualStudio15Tools' under 'SOFTWARE\\NuGet\\Repositoty'. 在'SOFTWARE \\ NuGet \\ Repositoty'下找不到名为'EntityFrameworkVisualStudio15Tools'的注册表项。

I had this problem, I solved using this way: 我有这个问题,我用这种方式解决了:

1 - https://docs.microsoft.com/en-us/nuget/guides/install-nuget#nuget-package-manager-in-visual-studio 1 - https://docs.microsoft.com/en-us/nuget/guides/install-nuget#nuget-package-manager-in-visual-studio

or 要么

2 - Install it again and choose the packged for your framework ( Individual Componentes ) 2 - 再次安装并选择为您的框架打包(个人组件)

3 - I havent try it but you can try to install only the individual components for your framework. 3 - 我没有尝试过,但你可以尝试只安装框架的各个组件。

I used the second option and it worked with me. 我使用了第二个选项,它与我合作。

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

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