gpt4 book ai didi

c# - TFS 构建 - C# 7.0 System.ValueType

转载 作者:太空宇宙 更新时间:2023-11-03 22:59:51 25 4
gpt4 key购买 nike

我尝试在 VisualStudio.com 上设置持续集成构建来构建我的项目。由于我升级到 .net 4.6.2 并使用 System.ValueType,因此构建失败:

MinimalMonitoringClient\MMCThinNetwork\Connection.cs(91,23): Error CS1519: Invalid token '(' in class, struct, or interface member declaration Connection.cs(91,23): error CS1519: Invalid token '(' in class, struct, or interface member declaration [d:\a\1\s\MinimalMonitoringClient\MMCThinNetwork\MMCThinNetwork.csproj] MinimalMonitoringClient\MMCThinNetwork\Connection.cs(91,47): Error CS1044: Cannot use more than one type in a for, using, fixed, or declaration statement Connection.cs(91,47): error CS1044: Cannot use more than one type in a for, using, fixed, or declaration statement [d:\a\1\s\MinimalMonitoringClient\MMCThinNetwork\MMCThinNetwork.csproj] MinimalMonitoringClient\MMCThinNetwork\Connection.cs(91,64): Error CS1002: ; expected

  • 它在我的本地计算机上编译
  • 已安装 NuGet 包“System.ValueType”
  • TFS 上没有包文件夹
  • “恢复 NuGet 包”任务包含在构建过​​程中
  • NuGet 还原构建步骤成功完成

2017-04-22T14:42:13.2402898Z ##[section]Starting: NuGet restore **/*.sln 2017-04-22T14:42:13.2512895Z ============================================================================== 2017-04-22T14:42:13.2512895Z Task : NuGet Installer 2017-04-22T14:42:13.2512895Z Description : Installs or restores missing NuGet packages 2017-04-22T14:42:13.2512895Z Version : 0.2.31 2017-04-22T14:42:13.2512895Z Author : Microsoft Corporation 2017-04-22T14:42:13.2512895Z Help : More Information 2017-04-22T14:42:13.2512895Z ============================================================================== 2017-04-22T14:42:14.3517087Z [command]C:\Windows\system32\chcp.com 65001 2017-04-22T14:42:14.3517087Z Active code page: 65001 2017-04-22T14:42:14.4246880Z Detected NuGet version 3.3.0.212 / 3.3.0 2017-04-22T14:42:14.4276880Z SYSTEMVSSCONNECTION exists true 2017-04-22T14:42:14.4286876Z To connect to NuGet feeds hosted in your Team Services account/TFS project collection on this build agent, edit your build definition to choose a higher version of nuget or specify a path to a NuGet.config containing the package sources you wish to use. 2017-04-22T14:42:14.4316868Z [command]d:\a_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.31\node_modules\nuget-task-common\NuGet\3.3.0\NuGet.exe restore -NonInteractive d:\a\1\s\MinimalMonitoringClient\MinimalMonitoringClient.sln 2017-04-22T14:42:15.2210188Z MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'. 2017-04-22T14:42:15.4566895Z Feeds used: 2017-04-22T14:42:15.4566895Z C:\Users\buildguest\AppData\Local\NuGet\Cache 2017-04-22T14:42:15.4576898Z https://api.nuget.org/v3/index.json 2017-04-22T14:42:15.4576898Z 2017-04-22T14:42:15.4786896Z Restoring NuGet package System.ValueTuple.4.3.0. 2017-04-22T14:42:15.4896877Z Restoring NuGet package Newtonsoft.Json.10.0.2. 2017-04-22T14:42:16.5110192Z Adding package 'System.ValueTuple.4.3.0' to folder 'd:\a\1\s\MinimalMonitoringClient\packages' 2017-04-22T14:42:16.5330192Z Added package 'System.ValueTuple.4.3.0' to folder 'd:\a\1\s\MinimalMonitoringClient\packages' 2017-04-22T14:42:16.7550436Z Adding package 'Newtonsoft.Json.10.0.2' to folder 'd:\a\1\s\MinimalMonitoringClient\packages' 2017-04-22T14:42:16.7780484Z Added package 'Newtonsoft.Json.10.0.2' to folder 'd:\a\1\s\MinimalMonitoringClient\packages' 2017-04-22T14:42:16.8080211Z ##[section]Finishing: NuGet restore **/*.sln

  • 在构建解决方案中,VS 版本设置为:2017
  • 干净:正确
  • 恢复 NuGet 包:正确

提前致谢

最佳答案

您需要使用 Hosted VS2017 Build Agent 来编译使用 VS2017 的东西。

enter image description here

关于c# - TFS 构建 - C# 7.0 System.ValueType,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43560656/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com