問題描述
在 VS 2019 中,ODT 使用擴展安裝,而不是像以前的版本那樣作為安裝文件.所以,從 VS 2017 升級的 EF 6 使用的 MVC 項目 edmx 文件在擴展安裝后不顯示數據庫圖表,空白黑頁,編輯 xml"選項等.
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.
如果您意識到錯誤列表中的錯誤!
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"的標簽和值都已經定義并正確!
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!
推薦答案
幾周后,我決定只為這個項目使用回 VS 2017,再次通過安裝文件安裝了 VS 2017 和 ODT for VS 2017.然后我找到了一個關于這個問題的網站.
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.
它說;
- 關閉所有 VS 實例
- 查找 VS devev.exe.config 文件
- 用文本編輯器打開
- 將所有Oracle"包含的設置從工作端復制到不工作端
就是這樣!
我從 VS 2017 的配置復制到 VS 2019 devev.exe.config 文件中的內容;
What I copied into VS 2019 devenev.exe.config file from VS 2017's config;
(根據擴展文件更改dll的路徑)
在 標簽
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" />
這篇關于Oracle Developer Tools for Visual Studio 2019 無法正確安裝的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!