microsoft/MIEngine

VS 2019 runtime issue with dependencies

arihannu opened this issue · 2 comments

In our testing, we have built MIEngine in VS2019, which builds just fine. However, trying to load the extension in VS2019 fails. There seems to be a version incompatibility with some of the dependency dlls, mainly that Microsoft.VisualStudio.Shell.15.0 (version 17.0.0) is not loading. After changing that dependency to load version 16.10.31321.278 when building for VS2019, MIEngine extension is loaded. Note that this dll might not be the only one which needs to be "downgraded" when building for VS2019. I believe, we should make a separate projects for VS2022 and VS2019, or make some sort of conditional versioning of the dependencies based on which VS is being targeted.

Also documentation should be updated.

There were a bunch of changes due to how extensions need to ship for VS 2022 since it is 64-bit.
These changes were made in this commit

As of that commit, MIEngine is targeting VS 2022. If you are looking to target VS 2019, my suggestion is to checkout the 16.10 branch then build and ship there.

oold commented

Another approach would be to downgrade the versions in package_versions.settings.targets. Note that there have been some changes to the Visual Studio assemblies. Interop stuff was consolidated. You'd have to remove the new Microsoft.VisualStudio.OLE.Interop assembly. It's not impossible. I've done it for our in-house build of the Debug Engine. Think it was a couple interfaces that I had to downgrade, too, but the code builds against the VS 2019 assemblies almost as-is.

Upgrading the existing fork to SDK-style projects was way worse than the dependency stuff.