生成失败,错误MT2101:无法解析引用'System.String [] System.String :: Split(System.Char,System.StringSplitOptio

编程入门 行业动态 更新时间:2024-10-27 10:31:31
本文介绍了生成失败,错误MT2101:无法解析引用'System.String [] System.String :: Split(System.Char,System.StringSplitOptions)'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

失败.有什么想法吗?

在Mac-Os14和我的mac OS中安装的软件的区别如下: 托管代理Mac-Os14:

The difference in INSTALLED SOFTWARE IN Mac-Os14 and my mac OS is below: Hosted agent Mac-Os14:

VS for Mac:8.4.0 Nuget:4.7.0 Xcode最新版本:11.3 .NET Core SDK 1.0.1 1.0.4 1.1.10 1.1.11 1.1.12 1.1.13 1.1.4 1.1.5 1.1.7 1.1.8 1.1.9 2.0.0 2.0.3 2.1.100 2.1.101 2.1 .102 2.1.103 2.1.104 2.1.105 2.1.2 2.1.200 2.1.201 2.1.202 2.1.300 2.1.301 2.1.302 2.1.4 2.1.400 2.1.401 2.1.402 2.1.403 2.1.500 2.1.502 2.1.503 2.1.504 2.1.505 2.2.100 2.2.101 2.2.102 2.2.103 2.2.104 2.2.105

VS for Mac: 8.4.0 Nuget: 4.7.0 Xcode Latest: 11.3 .NET Core SDK 1.0.1 1.0.4 1.1.10 1.1.11 1.1.12 1.1.13 1.1.4 1.1.5 1.1.7 1.1.8 1.1.9 2.0.0 2.0.3 2.1.100 2.1.101 2.1.102 2.1.103 2.1.104 2.1.105 2.1.2 2.1.200 2.1.201 2.1.202 2.1.300 2.1.301 2.1.302 2.1.4 2.1.400 2.1.401 2.1.402 2.1.403 2.1.500 2.1.502 2.1.503 2.1.504 2.1.505 2.2.100 2.2.101 2.2.102 2.2.103 2.2.104 2.2.105

我的Mac:

VS for Mac:8.4.1 Nuget:5.3.0 Xcode最新版本:11.3.1 .NET Core SDK SDK:/usr/local/share/dotnet/sdk/3.1.100/Sdks SDK版本: 3.1.100 3.0.101 3.0.100 2.1.701 2.1.700 2.1.505 2.1.504 2.1.302 MSBuild SDK:/Library/Frameworks/Mono.framework/Versions/6.6.0/lib/mono/msbuild/Current/bin/Sdks

VS for Mac: 8.4.1 Nuget: 5.3.0 Xcode Latest: 11.3.1 .NET Core SDK SDK: /usr/local/share/dotnet/sdk/3.1.100/Sdks SDK Versions: 3.1.100 3.0.101 3.0.100 2.1.701 2.1.700 2.1.505 2.1.504 2.1.302 MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.6.0/lib/mono/msbuild/Current/bin/Sdks

Visual Studio Mac环境

Environment for Visual Studio Mac

=== Visual Studio Community 2019 for Mac === Version 8.4.1 (build 4) Installation UUID: 1b63757d-df76-44cf-be32-c4667c711155 GTK+ 2.24.23 (Raleigh theme) Xamarin.Mac 5.16.1.25 (issue-7441-d16-3-vsmac / 881172e73) Package version: 606000155 === Mono Framework MDK === Runtime: Mono 6.6.0.155 (2019-08/296a9afdb24) (64-bit) Package version: 606000155 === Roslyn (Language Service) === 3.4.0-beta4-19562-05+ff930dec4565e2bc424ad3bf3e22ecb20542c87d === NuGet === Version: 5.3.0.6192 === .NET Core SDK === SDK: /usr/local/share/dotnet/sdk/3.1.100/Sdks SDK Versions: 3.1.100 3.0.101 3.0.100 2.1.701 2.1.700 2.1.505 2.1.504 2.1.302 MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.6.0/lib/mono/msbuild/Current/bin/Sdks === .NET Core Runtime === Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 3.1.0 3.0.1 3.0.0 2.1.14 2.1.13 2.1.12 2.1.11 2.1.9 2.1.8 2.1.2 === Xamarin.Profiler === Version: 1.6.12.26 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler === Updater === Version: 11 === Apple Developer Tools === Xcode 11.3.1 (15715) Build 11C504 === Xamarin.Mac === Version: 6.10.0.17 (Visual Studio Community) Hash: 5f802ef53 Branch: xcode11.3 Build date: 2020-01-07 11:53:06-0500 === Xamarin.iOS === Version: 13.10.0.17 (Visual Studio Community) Hash: 5f802ef53 Branch: xcode11.3 Build date: 2020-01-07 11:53:06-0500 === Xamarin Designer === Version: 16.4.0.478 Hash: 95f0ab363 Branch: remotes/origin/d16-4 Build date: 2020-01-08 23:59:46 UTC === Xamarin.Android === Version: 10.1.3.7 (Visual Studio Community) Commit: xamarin-android/d16-4/d66aed Android SDK: /Users/name/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: None installed SDK Tools Version: 26.1.1 SDK Platform Tools Version: 28.0.2 SDK Build Tools Version: 28.0.3 Build Information: Mono: fd9f379 Java.Interop: xamarin/java.interop/d16-4@c4e569f ProGuard: xamarin/proguard/master@905836d SQLite: xamarin/sqlite/3.28.0@46204c4 Xamarin.Android Tools: xamarin/xamarin-android-tools/master@9f4ed4b === Microsoft Mobile OpenJDK === Java SDK: /Users/name/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25 1.8.0-25 Android Designer EPL code available here: github/xamarin/AndroidDesigner.EPL === Android SDK Manager === Version: 16.4.0.9 Hash: 3f7256f Branch: remotes/origin/d16-4 Build date: 2020-01-08 19:54:56 UTC === Android Device Manager === Version: 16.4.0.28 Hash: 68e9956 Branch: remotes/origin/d16-4 Build date: 2020-01-08 19:55:18 UTC === Xamarin Inspector === Version: 1.4.3 Hash: db27525 Branch: 1.4-release Build date: Mon, 09 Jul 2018 21:20:18 GMT Client compatibility: 1 === Build Information === Release ID: 804010004 Git revision: 5f675128315bd5886b283aa192b334a02bc8a758 Build date: 2020-01-10 13:54:46+00 Build branch: release-8.4 Xamarin extensions: 6e5c119bf1e7b092680c1491be659f152329f74e === Operating System === Mac OS X 10.14.6 Darwin 18.7.0 Darwin Kernel Version 18.7.0 Tue Aug 20 16:57:14 PDT 2019 root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64

推荐答案

托管Mac上的默认Mono版本为5.12,这很可能导致此问题.将Bash脚本任务添加到执行以下代码的管道的开头,为我解决了该问题.

The default Mono version on hosted Macs is 5.12 which is most likely causing this issue. Adding a Bash script task to the beginning of the pipeline that executes the code below fixed the issue for me.

/bin/bash -c "sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh Latest" /bin/bash -c "echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'/Applications/Xcode_11.2.1.app;sudo xcode-select --switch /Applications/Xcode_11.2.1.app/Contents/Developer"

希望有帮助!

更多推荐

生成失败,错误MT2101:无法解析引用'System.String [] System.String :: Split(System.Char,Sys

本文发布于:2023-11-12 07:50:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580924.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   System   StringSplitOptions   Char   Split

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!