我最近在使用 TeamCity Build Agent 时遇到了一些问题。我开始在构建机器上用完空间,所以我选择删除一些旧的 Visual Studio (2013) 实例,并切换到仅使用 Visual Studio 2017 构建工具(其中包括卸载之前完整安装的 VS2017 Enterprise当下)。我认为由于这个过程,一些重要的构建组件已被无意中删除,但我不清楚它们到底是什么。我的项目使用 NuGet 包的组合,其中包括 NETStandard 库 v1.3 和一些 4.6.1 框架的 .NET 库。我得到的构建错误只发生在我的库上,它们都是 netstandard1.3 可移植库,它们都读取:
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\
bin\Microsoft.Common.CurrentVersion.targets(1122, 5): error MSB3644:
The reference assemblies for framework ".NETPortable,Version=v5.0" were not found.
To resolve this, install the SDK or Targeting Pack for this framework version
or retarget your application to a version of the framework for which you have the SDK
or Targeting Pack installed.
Note that assemblies will be resolved from the Global Assembly Cache (GAC)
and will be used in place of reference assemblies.
Therefore your assembly may not be correctly targeted for the framework you intend
以前这些项目在这台服务器上构建得很好,所以我假设任何符合 .NETPortable,Version=v5.0 库的内容都已被删除。我如何让他们回来?从我可以看到的构建工具中,我已经安装了所有可用的功能、netcore、所有框架,但它仍然不起作用。任何建议都将受到欢迎。