Skip to content

Commit 4681bf9

Browse files
authored
[release/9.0.1xx] Bring messaging and build agent fixes (#23746)
2 parents 5583a54 + 3ce6b82 commit 4681bf9

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

msbuild/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
https://dev.azure.com/azure-public/vside/_artifacts/feed/xamarin-impl/NuGet/Xamarin.Messaging.Client/
1616
1717
-->
18-
<MessagingVersion Condition="'$(MessagingVersion)' == ''">[18.0.136-g9e200fbc6d]</MessagingVersion>
18+
<MessagingVersion Condition="'$(MessagingVersion)' == ''">[18.0.280-ga047b642b9]</MessagingVersion>
1919
<HotRestartVersion>[17.14.133-g001ce2ac7a]</HotRestartVersion>
2020
</PropertyGroup>
2121
<Import Project="$(MSBuildThisFileDirectory)../Directory.Build.props" />

msbuild/Messaging/Xamarin.Messaging.Build/TaskRunner.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,19 @@ void SetDotNetVariables ()
6060
var xmaDotNetPath = default (string);
6161

6262
if (IsValidDotNetInstallation (xmaDotNetRootPath)) {
63-
//If the XMA dotnet is already installed, we use it and also declare a custom home for it (for NuGet restore and caches)
64-
Environment.SetEnvironmentVariable ("DOTNET_CUSTOM_HOME", Path.Combine (xmaSdkRootPath, ".home"));
6563
xmaDotNetPath = GetDotNetPath (xmaDotNetRootPath);
6664
} else {
6765
//In case the XMA dotnet has not been installed yet, we use the default dotnet installation
6866
xmaDotNetPath = GetDefaultDotNetPath ();
6967
xmaDotNetRootPath = Path.GetDirectoryName (xmaDotNetPath);
7068
}
7169

70+
//We want to define a custom home for dotnet only if it's the Pair To Mac SDK installation
71+
if (xmaDotNetRootPath.StartsWith (MessagingContext.BasePath, StringComparison.OrdinalIgnoreCase)) {
72+
//The custom home is used for storing caches and not mix them with the global installation (NuGet, dotnet, etc.)
73+
Environment.SetEnvironmentVariable ("DOTNET_CUSTOM_HOME", Path.Combine (xmaSdkRootPath, ".home"));
74+
}
75+
7276
var pathContent = GetPathContent ();
7377
//We add the XMA dotnet path first so it has priority over the default dotnet installation
7478
var newPathContent = $"{xmaDotNetRootPath}:{pathContent}";

0 commit comments

Comments
 (0)