我正在尝试使用scrcpy使this extension在Visual Studio中运行,并确定是否可以扩展其功能。
无法为Visual Studio 2019安装VSIX扩展
安装失败,指示:
我根据here更新了<InstallationTarget>
和<Dependency>
您需要将InstallationTarget更改为[15.0,17.0)和先决条件 到[15.8.27729.1,)。
我解压缩了.vsix文件,将extension.vsixmanifest
文件更新为以下内容:
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.0,17.0)" />
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" Version="[4.5,)" />
<Dependency Id="Microsoft.VisualStudio.MPF.15.0" DisplayName="Visual Studio MPF 15.0" Version="[15.0]" />
</Dependencies>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.8.27729.1,)" DisplayName="Visual Studio core editor" />
</Prerequisites>
压缩目录,重命名为* .vsix,尝试再次安装。
安装程序现在可以识别Visual Studio 2019,可以开始安装但失败,但缺少Microsoft.VisualStudio.Component.CoreEditor
。
12/11/2019 5:25:00 PM - Beginning to install extension to Visual Studio Enterprise 2019 (2)...
12/11/2019 5:25:02 PM - Install Error : Microsoft.VisualStudio.ExtensionManager.MissingReferencesException: This extension cannot be installed because the following references are missing:
-Microsoft.VisualStudio.Component.CoreEditor (Microsoft.VisualStudio.Component.CoreEditor)
at Microsoft.VisualStudio.ExtensionManager.EngineUtilities.EnsureNoMissingReferences(IEnumerable`1 missingRefs)
at Microsoft.VisualStudio.ExtensionManager.PackageInstaller.PrepareEngineInstall(IDependencyGraph dGraph, IDependencyComparisonSeed seed, Component vsixComponent, Boolean isProductComponent, Int32& totalInstallationSteps)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.PerformSetupEngineInstall(InstallableExtensionImpl extension, Boolean installPerMachine, Boolean isPackComponent, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, IProgress`1 progress, InstallFlags installFlags, AsyncOperation asyncOp, Version targetedVsVersion, IInstalledExtension& newExtension)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallInternal(InstallableExtensionImpl extension, InstallFlags installFlags, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, AsyncOperation asyncOp, IProgress`1 progress, Version targetedVsVersion)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.BeginInstall(IInstallableExtension installableExtension, InstallFlags installFlags, AsyncOperation asyncOp, Version targetedVsVersion)
at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallWorker(IInstallableExtension extension, InstallFlags installFlags, AsyncOperation asyncOp)
请建议下一步?
答案 0 :(得分:3)
答案 1 :(得分:1)
安装时缺少Microsoft.VisualStudio.Component.CoreEditor Visual Studio扩展
我认为主要的问题是您没有修改Microsoft.VisualStudio.Component.CoreEditor
的版本以支持catalog.json
文件中的Visual Studio 2019。因此,当您运行vsix文件时,它将监视然后运行该文件,缺少相应的VS2019 Microsoft.VisualStudio.Com ponent. CoreEditor
。
解决方案
除了对extension.vsixmanifest
文件的更改之外,
还要将"Microsoft.VisualStudio.Component.CoreEditor":"[15.0,16.0)"
文件中的catalog.json
更改为 [15.0,17.0)。
希望它可以为您提供帮助。
答案 2 :(得分:1)
正如Perry Qian-MSFT所述,在较新的Visual Studio上使用旧的vsix软件包时,应将 [14.0,16.0] 更新为当前VS版本 [14.0,xx.x ] 。
文件内