Skip to content

Commit

Permalink
[msbuild] Adjust error message when we can't find Xcode to not talk a…
Browse files Browse the repository at this point in the history
…bout VS. Fixes xamarin#19818.

Some people may use VSCode, or the command line, and talking about VS is confusing.

Fixes xamarin#19818.
  • Loading branch information
rolfbjarne committed Mar 14, 2024
1 parent 5913110 commit e3849b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 6 additions & 0 deletions msbuild/Xamarin.Localization.MSBuild/MSBStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@
<comment>The following are literal names and should not be translated: Xcode, Apple SDK, Visual Studio
{0} - The selected Xcode / Apple SDK directory.</comment>
</data>

<data name="E0044v2" xml:space="preserve">
<value>Could not find a valid Xcode app bundle at '{0}'. Please verify that 'xcode-select -p' points to your Xcode installation. For more information see https://aka.ms/macios-missing-xcode.
</value>
<comment>The following are literal names and should not be translated: Xcode</comment>
</data>

<data name="E0045" xml:space="preserve">
<value>Could not find valid a usable Xcode developer path
Expand Down
9 changes: 1 addition & 8 deletions msbuild/Xamarin.MacDev.Tasks/Tasks/DetectSdkLocationCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,7 @@ protected bool EnsureAppleSdkRoot ()
{
var currentSdk = CurrentSdk;
if (!currentSdk.IsInstalled) {
string ideSdkPath;
if (string.IsNullOrEmpty (SessionId))
// SessionId is only and always defined on windows.
// We can't check 'Environment.OSVersion.Platform' since the base tasks are always executed on the Mac.
ideSdkPath = "(Projects > SDK Locations > Apple > Apple SDK)";
else
ideSdkPath = "(Tools > Options > Xamarin > iOS Settings > Apple SDK)";
Log.LogError (MSBStrings.E0044, AppleSdkSettings.InvalidDeveloperRoot, ideSdkPath);
Log.LogError (MSBStrings.E0044v2 /* Could not find a valid Xcode app bundle at '{0}'. Please verify that 'xcode-select -p' points to your Xcode installation. For more information see https://aka.ms/macios-missing-xcode. */, AppleSdkSettings.InvalidDeveloperRoot);
return false;
}
Log.LogMessage (MessageImportance.Low, "DeveloperRoot: {0}", currentSdk.DeveloperRoot);
Expand Down

0 comments on commit e3849b3

Please sign in to comment.