Skip to content

Commit

Permalink
[msbuild] Don't use events and methods that are obsolete and do nothing.
Browse files Browse the repository at this point in the history
Fixes these warnings:

    IPhoneSdks.cs(22,4): warning CS0618: 'AppleSdkSettings.Changed' is obsolete: 'This event is never raised' [/work/maccore/onedotnet/xamarin-macios/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Tasks.Core.csproj]
    IPhoneSdks.cs(31,4): warning CS0618: 'AppleSdkSettings.CheckChanged()' is obsolete: 'This method does nothing' [/work/maccore/onedotnet/xamarin-macios/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Tasks.Core.csproj]
    MacOSXSdks.cs(18,4): warning CS0618: 'AppleSdkSettings.Changed' is obsolete: 'This event is never raised' [/work/maccore/onedotnet/xamarin-macios/msbuild/Xamarin.Mac.Tasks.Core/Xamarin.Mac.Tasks.Core.csproj]
    MacOSXSdks.cs(25,4): warning CS0618: 'AppleSdkSettings.CheckChanged()' is obsolete: 'This method does nothing' [/work/maccore/onedotnet/xamarin-macios/msbuild/Xamarin.Mac.Tasks.Core/Xamarin.Mac.Tasks.Core.csproj]

Also bump Xamarin.MacDev to pick up updated Xamarin.MacDev:

* xamarin/Xamarin.MacDev@0f578f5 [tests] Upgrade to NUnit 3.12 and use package references. (xamarin#65)
* xamarin/Xamarin.MacDev@55a30e2 [tests] Adjust tests to not expect the provisioning profiles in the index in any particular order. (xamarin#63)
* xamarin/Xamarin.MacDev@dc270f6 Make methods that do nothing obsolete and fix a compiler warning. (xamarin#67)
* xamarin/Xamarin.MacDev@681aef6 Remove unused csproj. (xamarin#66)
* xamarin/Xamarin.MacDev@d78a92f Update gitignore (xamarin#55)

Diff: https://github.com/xamarin/Xamarin.MacDev/compare/ca221c8fd65a6f1d6e85d77018d4a7619a2c120d..0f578f51e63b6ff93014782dbc9378e6b6bc6d75
  • Loading branch information
rolfbjarne committed Dec 20, 2019
1 parent f33ed7a commit af38477
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
5 changes: 0 additions & 5 deletions msbuild/Xamarin.Mac.Tasks.Core/MacOSXSdks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,10 @@ static MacOSXSdks ()
{
Native = new MacOSXSdk (AppleSdkSettings.DeveloperRoot, AppleSdkSettings.DeveloperRootVersionPlist);
XamMac = new XamMacSdk (null);

AppleSdkSettings.Changed += delegate {
Native = new MacOSXSdk (AppleSdkSettings.DeveloperRoot, AppleSdkSettings.DeveloperRootVersionPlist);
};
}

public static void CheckInfoCaches ()
{
AppleSdkSettings.CheckChanged ();
XamMac.CheckCaches ();
}
}
Expand Down
7 changes: 0 additions & 7 deletions msbuild/Xamarin.iOS.Tasks.Core/IPhoneSdks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,10 @@ public static class IPhoneSdks
static IPhoneSdks ()
{
Reload ();

AppleSdkSettings.Changed += delegate {
Native = new AppleIPhoneSdk (AppleSdkSettings.DeveloperRoot, AppleSdkSettings.DeveloperRootVersionPlist);
Watch = new AppleWatchSdk (AppleSdkSettings.DeveloperRoot, AppleSdkSettings.DeveloperRootVersionPlist);
TVOS = new AppleTVOSSdk (AppleSdkSettings.DeveloperRoot, AppleSdkSettings.DeveloperRootVersionPlist);
};
}

public static void CheckInfoCaches ()
{
AppleSdkSettings.CheckChanged ();
MonoTouch.CheckCaches ();
}

Expand Down

0 comments on commit af38477

Please sign in to comment.