VS 2019 的 G1ANT SDK 安装

G1ANT SDK installation for VS 2019

我在 the G1ANT.Robot github page 克隆了存储库,并在具有最新更新的 VS Studio 2019 CE 16.1.5、Win10 Pro 中打开了 G1ANT.Sdk.sln。我将默认构建属性保留为 "Debug" 和 "AnyCPU"。无法解决以下错误,因为我的系统上没有所需的文件:

Severity    Code    Description Project File    Line    Suppression State
Warning     Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.CoreUtility, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.   G1ANT.AddonTemplate         

还有其他错误,似乎都与对早期版本或 VS 版本的依赖有关(我认为有些依赖于 v14.0,有些依赖于 v15.0)。

我确实有 Microsoft.VisualStudio.CoreUtility 可用,但版本是 16.0(即 VS 2019)。简而言之,编译似乎需要比我拥有的版本更早的 VS。安装这么早的版本对我来说不是一个选择。

谢谢, burque505

是,文件 /G1ANT.Sdk/G1ANT.Sdk/source.extension.vsixmanifest 应该更改:

<Installation>
    <InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.0,]" />
    <InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[15.0,]" />
    <InstallationTarget Id="Microsoft.VisualStudio.Enterprise" Version="[15.0,]" />
</Installation>
<Dependencies>
    <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.6.1,)" />
</Dependencies>

可以下载正确安装:https://github.com/G1ANT-Robot/G1ANT.Sdk/raw/master/G1ANT.Sdk.vsix

我相信它会有所帮助:)