Skip to content

Commit e21e1aa

Browse files
authored
Accept 'tools/buildinfo' as an alternative path to 'buildinfo' due to an nuget bug. (#70)
nuget doesn't like files that start with 'build*' in the root nuget directory [1], so avoid it by putting 'buildinfo' in 'tools/buildinfo' instead. [1]: NuGet/Home#8810
1 parent ce24236 commit e21e1aa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Xamarin.MacDev/MonoTouchSdk.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,13 @@ public static bool ValidateSdkLocation (string sdkDir, out bool hasUsrSubdir)
285285
ExtendedVersion extended_version;
286286
public ExtendedVersion ExtendedVersion {
287287
get {
288-
if (extended_version == null)
288+
if (extended_version == null) {
289289
extended_version = ExtendedVersion.Read (Path.Combine (SdkDir, "buildinfo"));
290+
if (extended_version == null) {
291+
// 'buildinfo' doesn't work in a nuget package because of https://github.com/NuGet/Home/issues/8810, so use 'tools/buildinfo' instead.
292+
extended_version = ExtendedVersion.Read (Path.Combine (SdkDir, "tools", "buildinfo"));
293+
}
294+
}
290295
return extended_version;
291296
}
292297
}

0 commit comments

Comments
 (0)