我想为Visual Studio Build Tools 2017创建扩展名(VSIX?)。 该扩展只包含MSBuild任务和目标。
<虽然我通过VSIX项目为Build Tools创建了VSIX并尝试安装,但是VSIXInstaller返回了错误:----命令行---- vsixinstaller / appidInstallPath:" C:\Program Files(x86)\ Microsoft Visual Studio \\\ 2017 \ BuildTools" / appIdName:"构建工具" / s:BuildTools /v:15.0 MyMSBuild.vsix ----------------------
-------- log --------- $ 2018/02/16 17:25:20 - System.InvalidOperationException:VSHiveStub.exe失败:PkgdefManagement失败创建应用程序:"0x80030002"。 在VSIXInstaller.LocationBasedSKU.get_RegRootHiveOverride() 在VSIXInstaller.SupportedVSSKU.InitializeSettingsManager() 在VSIXInstaller.SupportedVSSKU.get_Host() 在VSIXInstaller.SupportedVSSKU.CreateExtensionEngine() 在System.Lazy`1.CreateValue() 在System.Lazy`1.LazyInitValue() 在System.Lazy`1.get_Value() 在VSIXInstaller.App.GetExtensionEngineForApplicableSKU(SupportedVSSKU supportedSKU,IInstallableExtension installableExtension,List`1 applicableSKUs,Boolean isRepairSupported) 在VSIXInstaller.App.GetInstallableData(String vsixPath,Boolean isRepairSupported,IEnumerable`1& skuData) 在VSIXInstaller.App.Initialize(Boolean isRepairSupported) 在VSIXInstaller.App.Initialize() 在System.Threading.Tasks.Task`1.InnerInvoke() 在System.Threading.Tasks.Task.Execute() ----------------------
---- vsixmanifest ---- <?xml version =" 1.0" encoding =" utf-8"?> < PackageManifest Version =" 2.0.0" xmlns =" schemas.microsoft/developer/vsx-schema/2011 " ; xmlns:d =" schemas.microsoft/developer/vsx-schema-design/ 2011 "> <元数据> < Identity Id =" MyMSBuild"版本= QUOT; 1.0.0.0"语言=" EN-US"出版商= QUOT; XXXXX" /> $ < DisplayName> MSBuild支持< / DisplayName> <描述xml:space ="保留"> MSBuild支持。< / Description> < Icon> Resources\Package.ico< / Icon> < /元数据> < Installation InstalledByMsi =" false" AllUsers =" true"> < InstallationTarget Id =" Microsoft.VisualStudio.BuildTools"版本= QUOT; [15.0,16.0)" /> < /安装> <依赖关系> < Dependency Id =" Microsoft.Framework.NDP" DisplayName =" Microsoft .NET Framework" d:源= QUOT;手动"版本= QUOT; [4.6,)" /> < / Dependencies> <资产> < / Assets> <先决条件> <先决条件Id =" Microsoft.Component.MSBuild"版本= QUOT; [15.0,16.0)"显示名称= QUOT;&的MSBuild QUOT; /> < /先决条件> < / PackageManifest> ----------------------
如何为Build Tools创建扩展?
解决方案
简短回答。考虑使用 NuGet 。
.VSIX文件基本上是一个.ZIP文件带有清单。它用于安装Visual Studio IDE扩展。 VSIXInstaller.exe是一个与Visual Studio IDE一起安装的实用程序,并且在VS Build Tools安装的地方不能使用。
此致
I would like to create the extension (VSIX?) for Visual Studio Build Tools 2017. That extension contains only MSBuild tasks and targets.
VSIXInstaller returned the error though I created VSIX for Build Tools by the VSIX project and tried installing:
---- command line ---- vsixinstaller /appidInstallPath:"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools" /appIdName:"Build Tools" /s:BuildTools /v:15.0 MyMSBuild.vsix ----------------------
-------- log --------- 2018/02/16 17:25:20 - System.InvalidOperationException: VSHiveStub.exe failed: PkgdefManagement failed to create application: "0x80030002". at VSIXInstaller.LocationBasedSKU.get_RegRootHiveOverride() at VSIXInstaller.SupportedVSSKU.InitializeSettingsManager() at VSIXInstaller.SupportedVSSKU.get_Host() at VSIXInstaller.SupportedVSSKU.CreateExtensionEngine() at System.Lazy`1.CreateValue() at System.Lazy`1.LazyInitValue() at System.Lazy`1.get_Value() at VSIXInstaller.App.GetExtensionEngineForApplicableSKU(SupportedVSSKU supportedSKU, IInstallableExtension installableExtension, List`1 applicableSKUs, Boolean isRepairSupported) at VSIXInstaller.App.GetInstallableData(String vsixPath, Boolean isRepairSupported, IEnumerable`1& skuData) at VSIXInstaller.App.Initialize(Boolean isRepairSupported) at VSIXInstaller.App.Initialize() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() ----------------------
---- vsixmanifest ---- <?xml version="1.0" encoding="utf-8"?> <PackageManifest Version="2.0.0" xmlns="schemas.microsoft/developer/vsx-schema/2011" xmlns:d="schemas.microsoft/developer/vsx-schema-design/2011"> <Metadata> <Identity Id="MyMSBuild" Version="1.0.0.0" Language="en-US" Publisher="XXXXX" /> <DisplayName>MSBuild Support</DisplayName> <Description xml:space="preserve">MSBuild Support.</Description> <Icon>Resources\Package.ico</Icon> </Metadata> <Installation InstalledByMsi="false" AllUsers="true"> <InstallationTarget Id="Microsoft.VisualStudio.BuildTools" Version="[15.0,16.0)" /> </Installation> <Dependencies> <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.6,)" /> </Dependencies> <Assets> </Assets> <Prerequisites> <Prerequisite Id="Microsoft.Component.MSBuild" Version="[15.0,16.0)" DisplayName="MSBuild" /> </Prerequisites> </PackageManifest> ----------------------
How can I create extension for Build Tools?
解决方案Short answer. Consider using NuGet.
A .VSIX file is basically a .ZIP file with a manifest. It's used to install Visual Studio IDE extensions. The VSIXInstaller.exe is a utility installed along with the Visual Studio IDE, and is not something that can be used where just the VS Build Tools are installed.
Sincerely,
更多推荐
如何为Visual Studio Build Tools 2017创建扩展?
发布评论