Extension package should have dependency on `Microsoft.VisualStudio.Component.DslTools`
mmarinchenko opened this issue · 10 comments
It's possible to install EFDesigner extension on Visual Studio without DslTools installed. In this case extension doesn't work (including options page).
It would be convenient to explicitly include corresponding dependency in the package.
There shouldn't be a dependency on DslTools being installed. I'll investigate.
Additional info (screenshot and activity log):
This only happens in absence of DslTools. When I install DslTools EFDesigner works properly.
The error shown in the ActivityLog occurred when the extension tried to load the MEF assemblies, which support the context menus (among other features). All that's included in Microsoft.VisualStudio.Modeling.Sdk.Shell.15.0.dll
, which is part of the VSIX.
Which version of the extension were you trying to install?
I've spent some time investigating this issue further. Here are my findings.
I have v3.0.6.1
installed. But if I understand correctly this issue is really old, see ex. #66, #277, #292. Unfortunately, ActivityLog
doesn't contain info about why this happens.
The Microsoft.VisualStudio.Modeling.Sdk.Shell.15.0.dll
assembly is part of Microsoft.VisualStudio.Component.VSSDK
package. VSSDK
itself is not sufficient for EFDesigner to work. There is another package, so-called "Modelling SDK" which is known as Microsoft.VisualStudio.Component.DslTools
internally.
DslTools
package contains built-in VS extension "Modelling" with Microsoft.VisualStudio.Modeling.Components.15.0.dll
assembly which is not part of EFDesigner VSIX. You may try to remove DslTools
package through VS Installer (i.e "Modelling SDK") or just move C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\Microsoft\Modeling
folder to some external location to reproduce the issue.
I hope this helps!
Ты гений!
Based on the information you supplied, I was able to reproduce the issue and have baked Microsoft.VisualStudio.Modeling.Components.15.0.dll
into the package, which appears to resolve it. Can you give it a try at https://github.com/msawczyn/EFDesigner/raw/master/dist/Sawczyn.EFDesigner.EFModel.DslPackage.vsix ?
Ты гений!
Oh, I hardly think so))) But thanks anyway!
https://github.com/msawczyn/EFDesigner/raw/master/dist/Sawczyn.EFDesigner.EFModel.DslPackage.vsix
I installed your VSIX. Version is 3.0.7.0
now. Unfortunately, it still doesn't work.
There are 2 cases.
-
If I install "Modeling SDK" (
DslTools
) through VS Installer and then just remove "Modeling" extension folder then it works (previous versions doesn't work in this case). -
If I remove "Modeling SDK" (
DslTools
) through VS Installer then it doesn't work. Perhaps the problem is that theMicrosoft.VisualStudio.Modeling.Components.15.0.dll
assembly is installed as a MEF component in "Modelling" extension (see itsextension.vsixmanifest
). My knowledge is not enough to say this for sure.
Maybe you can figure out what's wrong. I've attached an archive with a complete dependency tree of DSL runtime packages from VS Installer:
Thanks for the testing. I'll dig some more.
I have to admit I was wrong initially. Microsoft.VisualStudio.Component.DslTools
is not really a package that you can depend on. DSL SDK
requires VS Pro edition, so it doesn't work in VS Community.
It turns out the correct package is Microsoft.VisualStudio.PackageGroup.DslRuntime
. Or even just Microsoft.VisualStudio.Dsl.Core
(if EF Designer doesn't require Microsoft.VisualStudio.Dsl.GraphObject
).
If one of this packages will be added as dependency then, I suppose, the following files can be safely removed from EF Designer:
Microsoft.VisualStudio.Modeling.Components.15.0.dll
Microsoft.VisualStudio.Modeling.Sdk.15.0.dll
Microsoft.VisualStudio.Modeling.Sdk.15.0.pdb
Microsoft.VisualStudio.Modeling.Sdk.15.0.xml
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.15.0.dll
Microsoft.VisualStudio.Modeling.Sdk.Diagrams.15.0.xml
Microsoft.VisualStudio.Modeling.Sdk.Integration.15.0.dll
Microsoft.VisualStudio.Modeling.Sdk.Integration.Shell.15.0.dll
Microsoft.VisualStudio.Modeling.Sdk.Integration.Shell.15.0.resources.dll
Microsoft.VisualStudio.Modeling.Sdk.Shell.15.0.dll
Microsoft.VisualStudio.Modeling.Sdk.Shell.15.0.xml
Microsoft.VisualStudio.TextTemplating.Modeling.15.0.dll
I see that you've added Microsoft.VisualStudio.Modeling.Components.15.0.dll
as a reference to the DslPackage
project trying to solve this issue:
EFDesigner/src/DslPackage/DslPackage.csproj
Lines 89 to 91 in ffb4465
Have you tried the following?
1. Remove the mentioned reference from the DslPackage
project.
2. Add Microsoft.VisualStudio.Modeling.Components.15.0.dll
to the DslPackage
project as content similar to these 2 dlls:
EFDesigner/src/DslPackage/DslPackage.csproj
Lines 314 to 319 in ffb4465
Code to add:
<Content Include="Microsoft.VisualStudio.Modeling.Components.15.0.dll">
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
3. Add Microsoft.VisualStudio.Modeling.Components.15.0.dll
to the source.extension.tt
template as MefComponent
asset:
EFDesigner/src/DslPackage/source.extension.tt
Lines 38 to 44 in ffb4465
Code to add:
<Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="File" Path="Microsoft.VisualStudio.Modeling.Components.15.0.dll" />