問題描述
在 VS 2019 中,ODT 使用擴(kuò)展安裝,而不是像以前的版本那樣作為安裝文件.所以,從 VS 2017 升級(jí)的 EF 6 使用的 MVC 項(xiàng)目 edmx 文件在擴(kuò)展安裝后不顯示數(shù)據(jù)庫圖表,空白黑頁,編輯 xml"選項(xiàng)等.
In VS 2019, ODT install with an extension, not as a setup file like previous version. So, from VS 2017 upgraded EF 6 used MVC project edmx file doesn't show database diagram after extension installation, blank black page, "edit xml" option etc. that's all.
如果您意識(shí)到錯(cuò)誤列表中的錯(cuò)誤!
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 等中的所有配置文件.一切看起來都很好,所有關(guān)于Oracle.ManagedDataAccess.Client"的標(biāo)簽和值都已經(jīng)定義并正確!
I checked all config files in solution app.config, web.config, etc. everything looks good, all tags and values about "Oracle.ManagedDataAccess.Client" already defined and correct!
推薦答案
幾周后,我決定只為這個(gè)項(xiàng)目使用回 VS 2017,再次通過安裝文件安裝了 VS 2017 和 ODT for VS 2017.然后我找到了一個(gè)關(guān)于這個(gè)問題的網(wǎng)站.
After some weeks, I decided to use back VS 2017 only for this project, installed VS 2017 again and ODT for VS 2017 by setup file. Then I found a web site about this problem.
它說;
- 關(guān)閉所有 VS 實(shí)例
- 查找 VS devev.exe.config 文件
- 用文本編輯器打開
- 將所有Oracle"包含的設(shè)置從工作端復(fù)制到不工作端
就是這樣!
我從 VS 2017 的配置復(fù)制到 VS 2019 devev.exe.config 文件中的內(nèi)容;
What I copied into VS 2019 devenev.exe.config file from VS 2017's config;
(根據(jù)擴(kuò)展文件更改dll的路徑)
在 標(biāo)簽
in < assemblyBinding > tag
<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>
還有
在
in < DbProviderFactories > tag
<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" />
這篇關(guān)于Oracle Developer Tools for Visual Studio 2019 無法正確安裝的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!