[mtouch] Fix the MT0091 (now called MT0180) after recent code changes. Fixes xamarin/maccore@2280. (#9342)

Also fix a confusion between the M?0179 and M?0180 error message vs error number.

Fixes https://github.com/xamarin/maccore/issues/2280.
This commit is contained in:
Rolf Bjarne Kvinge 2020-08-10 21:49:50 +02:00 коммит произвёл GitHub
Родитель f822013d87
Коммит 855c2b09fc
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -1077,7 +1077,7 @@ public class B : A {}
[Test]
[TestCase (Profile.tvOS, "tvOS")]
[TestCase (Profile.iOS, "iOS")]
public void MT0091 (Profile profile, string name)
public void MT0180 (Profile profile, string name)
{
// Any old Xcode will do.
var old_xcode = Configuration.GetOldXcodeRoot ();
@ -1110,7 +1110,7 @@ public class B : A {}
mtouch.Sdk = sdk_version;
Assert.AreEqual (1, mtouch.Execute (MTouchAction.BuildSim));
var xcodeVersionString = Configuration.XcodeVersionString;
mtouch.AssertError (91, String.Format ("This version of Xamarin.iOS requires the {0} {1} SDK (shipped with Xcode {2}). Either upgrade Xcode to get the required header files or set the managed linker behaviour to Link Framework SDKs Only in your project's iOS Build Options > Linker Behavior (to try to avoid the new APIs).", name, GetSdkVersion (profile), xcodeVersionString));
mtouch.AssertError (180, String.Format ("This version of Xamarin.iOS requires the {0} {1} SDK (shipped with Xcode {2}). Either upgrade Xcode to get the required header files or set the managed linker behaviour to Link Framework SDKs Only in your project's iOS Build Options > Linker Behavior (to try to avoid the new APIs).", name, GetSdkVersion (profile), xcodeVersionString));
}
}

Просмотреть файл

@ -437,9 +437,9 @@ namespace Xamarin.Bundler {
case ApplePlatform.iOS:
case ApplePlatform.TVOS:
case ApplePlatform.WatchOS:
throw ErrorHelper.CreateError (180, Errors.MX0179, ProductName, PlatformName, SdkVersions.GetVersion (this), SdkVersions.Xcode);
throw ErrorHelper.CreateError (180, Errors.MX0180, ProductName, PlatformName, SdkVersions.GetVersion (this), SdkVersions.Xcode);
case ApplePlatform.MacOSX:
throw ErrorHelper.CreateError (179, Errors.MX0180, ProductName, PlatformName, SdkVersions.GetVersion (this), SdkVersions.Xcode);
throw ErrorHelper.CreateError (179, Errors.MX0179, ProductName, PlatformName, SdkVersions.GetVersion (this), SdkVersions.Xcode);
default:
// Default to the iOS error message, it's better than showing MX0071 (unknown platform), which would be completely unrelated
goto case ApplePlatform.iOS;