Visual Studio 2019 年 DotVVM 扩展安装错误

DotVVM extension install errors on Visual Studio 2019

我正在尝试在 Visual Studio 2019 年安装 DotVVM。现在我可以在 'manage extensions' 时找到它,并且它可以毫无错误地下载和安装。但是,当我重新启动 Visual Studio post 安装时,我收到一条错误消息,指出 'The DotVVM package did not load correctly' 并将我指向一个 xml 输出文件。该文件的内容显示:

SetSite failed for package [DotvvmPackage] Source: System.ComponentModel.Composition Description: The composition produced multiple composition errors, with 3 root causes. The root causes are provided below. Review the CompositionException.Errors property for more detailed information

  1. No exports were found that match the constraint: ContractName DotVVM.Integration.VisualStudio.Dialogs.DialogFactory RequiredTypeIdentity DotVVM.Integration.VisualStudio.Dialogs.DialogFactory Resulting in: Cannot set import DotVVM.Integration.VisualStudio.VsPackages.DotvvmPackageDependencies.DialogFactory (ContractName='DotVVM.Integration.VisualStudio.DialogFactory') on part DotVVM.Integration.VisualStudio.VsPackages.DotvvmPackageDependencies.Element: DotVVM.Integration.VisualStudio.VsPackages.DotvvmDependencies.DialogFactory (ContractName='DotVVM.Integration.VisualStudio.Dialogs.DialogFactory') DotVVM.Integration.VisualStudio.VsPackages.DotvvmPackageDependencies
  1. No exports were found that match the constraint: Pretty much the same error except it's talking about 'DotVVM.Integration.VisualStudio.Common.Licensing.ILoginProvider'
  1. No exports were found that match the constraint:* Same error except it's talking about 'DotVVM.Integration.VisualStudio.Services.CommandService'

现在我一直在尝试寻找其他主题并遇到许多说要删除(或重命名)'%appData%'/Local/Microsoft/VisualStudio/16.0/ComponentModelCache' 文件夹,我试过没有运气。也将其从每个 VisualStudio 版本文件夹中删除。当然之后重新启动 Visual Studio。该文件夹确实自行重建,但我再次遇到同样的错误。

我也试过卸载并重新安装它。厌倦了 运行 Visual Studio 作为踢球的管理员。甚至直接下载 DotVVM.Integration.VisualStudio.2019.RTM.vsix 文件(4.0.534 和 4.0.539)并以这种方式安装它,但没有成功。

我也尝试完全卸载并重新安装 Visual Studio 2019,但没有成功。我确保整个 VisualStudio/16.0 文件夹在安装之间也消失了。

我已经能够安装其他扩展了,只是为了看看。

我似乎在尝试安装时丢失了某些东西或一些文件,但我不知道是什么。有什么想法吗?

原来我的 Visual Studio 版本是问题所在。我的协作环境将我锁定到 16.10.2,这不是最新版本。 Visual Studio 更新声明我是最新的但我不是。

DotVVM 版本 (4.0.539) 不支持 visual studio 的 16.10.2 版本,因此出现错误。我确实找到了一个旧版本的 DotVVM (2.5.254),它支持 visual studio 的那个版本并且工作正常。