According to the documentation there should be a static String.Copy method available. However it's not available in my setup:
This is the detailed info about the versions of everything installed:
=== Visual Studio Community 2017 for Mac ===
Version 7.0.1 (build 24) Installation UUID: fda7d9c6-ac7a-446b-895c-2823b983c917 Runtime: Mono 5.0.1.1 (2017-02/5077205) (64-bit) GTK+ 2.24.23 (Raleigh theme)
Package version: 500010001
=== NuGet ===
Version: 4.0.0.2323
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet SDK: /usr/local/share/dotnet/sdk/1.0.3/Sdks MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.5.4 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Xamarin.Android ===
Version: 7.3.1.2 (Visual Studio Community) Android SDK: /Users/milen/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 4.4 (API level 19) 7.1 (API level 25)
SDK Tools Version: 25.2.5 SDK Platform Tools Version: 25.0.4 SDK Build Tools Version: 25.0.3
Java SDK: /usr java version "1.8.0_111" Java(TM) SE Runtime Environment (build 1.8.0_111-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL
=== Xamarin Inspector ===
Version: 1.2.2 Hash: b71b035 Branch: d15-1 Build date: Fri, 21 Apr 2017 17:57:12 GMT
=== Apple Developer Tools ===
Xcode 8.3.3 (12175.1) Build 8E3004b
=== Xamarin.iOS ===
Version: 10.10.0.36 (Visual Studio Community) Hash: d2270eec Branch: d15-2 Build date: 2017-05-22 16:30:53-0400
=== Xamarin.Mac ===
Version: 3.4.0.36 (Visual Studio Community)
=== Build Information ===
Release ID: 700010024 Git revision: 7ab1ca2ced6f584e56b7a0d4d321d00775cd95c9 Build date: 2017-05-19 05:44:51-04 Xamarin addins: 08d17158f3365beee5e60f67999e607cce4b3f93 Build lane: monodevelop-lion-d15-2
=== Operating System ===
Mac OS X 10.12.5 Darwin 16.6.0 Darwin Kernel Version 16.6.0 Fri Apr 14 16:21:16 PDT 2017 root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
The code is in a PCL with the following profile:
I couldn't find any info on such a problem. What might be the reason?
Like Jimbot states in the comments, String.Copy
is not available on Windows Phone and UWP, maybe it isn't available on some other platforms as well. Using a PCL means that you will get only the support of the parts of the libraries that intersect between all checked platforms.
So in your screenshot, a method has to be available on all platforms that you have checked there. If the method is not available on one, then it won't be accessible for you. That is the way a PCL works. Read more on this in the Xamarin documentation here.
To overcome this:
String.Copy
and which one doesn't