We're currently trying to troubleshoot an issue with Visual Studio 2022 which fails to load the visual edmx file editor on a given set of hosts but works perfectly fine on another set of hosts that have been installed from the same offline-layout setup.
Using Visual Studio 2022, version 17.6.4 there is an error message when directly opening an edmx-file with Visual Studio 2022: The "Microsoft.Entity.Design.Package.MicrosoftDataEntityDesignPackage" package did not load correctly. Note that it does load and work correctly when using Visual Studio 2019 on the same host.
When loading the edmx file after opening the containing solution, it just shows the XML version of the view. On right-click, "open with" there is no "edmx-designer" in the list of possible selection items.
The "ActiviyLog.xml" contains error record that look like this:
<entry>
<record>964</record>
<time>2023/08/01 11:07:46.041</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Microsoft.Data.Entity.Design.Package.MicrosoftDataEntityDesignPackage]Source: 'Microsoft.Data.Entity.Design.Package' Description: Could not load file or assembly 'Microsoft.VisualStudio.Modeling.Sdk.Shell.15.0, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Das System kann die angegebene Datei nicht finden.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Modeling.Sdk.Shell.15.0, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Das System kann die angegebene Datei nicht finden.
File name: 'Microsoft.VisualStudio.Modeling.Sdk.Shell.15.0, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
 at Microsoft.Data.Entity.Design.Package.MicrosoftDataEntityDesignPackage.Dispose(Boolean disposing)
 at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.Close()

WRN: Protokollierung der Assemblybindung ist AUS.
Sie können die Protokollierung der Assemblybindungsfehler aktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) auf 1 festlegen.
Hinweis: Die Protokollierung der Assemblybindungsfehler führt zu einer gewissen Leistungseinbuße.
Sie können dieses Feature deaktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] entfernen.
</description>
<guid>{8889E051-B7F9-4781-BB33-2A36A9BDB3A5}</guid>
<hr>80070002</hr>
<errorinfo></errorinfo>
</entry>
Which may lead to the conclusion to check if Microsoft.VisualStudio.Modeling.Sdk.Shell.15.0
is present / how to install it.
Microsoft.VisualStudio.Component.EntityFramework
is installed (using vs_installer)Microsoft.VisualStudio.Modeling.Sdk.dll
is present in2022\Professional\Common7\IDE\PrivateAssemblies
(as well as the PrivateAssemblies directory of vs2019 andVSSDK\VisualStudioIntegration\Common\Assemblies\v4.0
- although this directires contain explicitly the.15.0.dll
version)- manually adding the
Microsoft.VisualStudio.Modeling.Sdk.Shell
(version 15) nuget package to the solution did not solve the problem - Completely purging and re-installing Visual Studio does not solve the problem.
- Manually installing the lastest version of .Net Framework 4.8 does not solve the problem. (The only notable difference between the set of hosts where the edmx designer loads / does not load is the installed dotnet framework version: 4.8.040844.8 on the hosts that are ok, 4.8.03761 on the hosts that have the issue. Also, ".Net Framework 4.8" does not show up in "Apps & Features" on the hosts with this issue, it does on the hosts that are ok.)
- clearing the nuget cache and intermediate output directores does not solve the problem.
We are currently out of ideas where to continue troubleshooting and would be greatful for any input.