-
Notifications
You must be signed in to change notification settings - Fork 516
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit f8552e9. This change is only supposed to be released with .NET 9, and we might release new .NET 8 updates from main. Thus we need to make sure these changes are only in the net9.0 branch (they already are).
- Loading branch information
1 parent
002eedd
commit b30dc91
Showing
12 changed files
with
82 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using System; | ||
using Microsoft.Build.Framework; | ||
using Microsoft.Build.Utilities; | ||
using Xamarin.Localization.MSBuild; | ||
using Xamarin.MacDev.Tasks; | ||
using Xamarin.Messaging.Build.Client; | ||
using Xamarin.Messaging.Build.Contracts; | ||
using Threading = System.Threading.Tasks; | ||
|
||
namespace Xamarin.MacDev.Tasks { | ||
public class VerifyXcodeVersion : XamarinTask { | ||
public override bool Execute () => ExecuteAsync ().Result; | ||
|
||
async Threading.Task<bool> ExecuteAsync () | ||
{ | ||
try { | ||
var connection = await BuildConnection.GetAsync (BuildEngine4).ConfigureAwait (continueOnCapturedContext: false); | ||
var buildClient = connection.GetClient (SessionId) as BuildClient; | ||
|
||
if (!connection.IsConnected || buildClient is null) { | ||
Log.LogWarning (MSBStrings.E0179, nameof (VerifyXcodeVersion)); | ||
|
||
return true; | ||
} | ||
|
||
var xcodeVerificationResult = await buildClient | ||
.RunMessagingAsync<VerifyXcodeVersionMessage, VerifyXcodeVersionResult> (new VerifyXcodeVersionMessage ()) | ||
.ConfigureAwait (continueOnCapturedContext: false); | ||
|
||
if (!xcodeVerificationResult.IsCompatibleVersion) { | ||
if (string.IsNullOrEmpty (xcodeVerificationResult.XcodeVersion) || string.IsNullOrEmpty (xcodeVerificationResult.RecommendedXcodeVersion)) { | ||
Log.LogWarning (MSBStrings.E0183); | ||
} else { | ||
Log.LogWarning (MSBStrings.E0184, xcodeVerificationResult.XcodeVersion, xcodeVerificationResult.RecommendedXcodeVersion); | ||
} | ||
} | ||
|
||
return true; | ||
} catch (Exception ex) { | ||
Log.LogWarning (MSBStrings.E0185, ex.Message); | ||
|
||
return true; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.