在 VS 2019 中,ODT 使用扩展名安装,而不是像以前的版本那样作为安装文件安装。因此,从 VS 2017 升级的 EF 6 使用的 MVC 项目 edmx 文件在扩展安装后不显示数据库图表、空白黑页、“编辑 xml”选项等。仅此而已。
如果您意识到的话,错误列表中会出现错误!
The ADO.NET provider with invariant name 'Oracle.ManagedDataAccess.Client' is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details
我检查了解决方案 app.config、web.config 等中的所有配置文件。一切看起来都很好,有关“Oracle.ManagedDataAccess.Client”的所有标签和值都已定义且正确!
几周后,我决定仅在这个项目中使用 VS 2017,再次安装 VS 2017 并通过安装文件安装 VS 2017 的 ODT。然后我找到了一个web site http://errummwelluhh.blogspot.com/2020/01/关于这个问题。
It says;
- 关闭所有VS实例
- 找到VS devenev.exe.config文件
- 用文本编辑器打开它
- 将所有“Oracle”包含的设置从工作端复制到非工作端
就是这样!
我从 VS 2017 的配置复制到 VS 2019 devenev.exe.config 文件中的内容;
(根据扩展文件更改了dll的路径)
在 标签中
<dependentAssembly>
<assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
<codeBase version="4.122.19.1" href="C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\m3m25bey.i3v\Assemblies\DataProviders\Oracle.ManagedDataAccess.dll" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Oracle.ManagedDataAccess.EntityFramework" publicKeyToken="89b483f429c47342" culture="neutral" />
<codeBase version="6.122.19.1" href="C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\m3m25bey.i3v\Assemblies\DataProviders\Oracle.ManagedDataAccess.EntityFramework.dll" />
</dependentAssembly>
and also
在标签中
<remove invariant="Oracle.ManagedDataAccess.Client" />
<add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342" />
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)