Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[msbuild] Fix calling the GetFileSystemEntries task on Windows when not connected to a Mac. #18287

Merged
merged 1 commit into from May 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions dotnet/targets/Xamarin.Shared.Sdk.targets
Expand Up @@ -1882,6 +1882,10 @@ global using nfloat = global::System.Runtime.InteropServices.NFloat%3B
<_BindingPackagesFromReferencedAssembliesDirectoriesExists Include="@(_BindingPackagesFromReferencedAssembliesDirectoriesCandidates->Distinct())" Condition="Exists('%(Identity)')" />
</ItemGroup>

<PropertyGroup Condition="'$(IsMacEnabled)' == 'true'">
<BuildSessionIdIfConnected>$(BuildSessionId)</BuildSessionIdIfConnected>
</PropertyGroup>

<!--
We need to expand items in an item group using globs, which is
kind of tricky, because globs in item transformations aren't
Expand All @@ -1890,11 +1894,12 @@ global using nfloat = global::System.Runtime.InteropServices.NFloat%3B
Note that this task should run remotely from Windows when there's
a Mac connected, but locally when there's not a Mac connected (for
Hot Restart builds for instance), so we're not conditioning this
task on IsMacEnabled.
task on IsMacEnabled. Instead we're only setting SessionId if we
have a session id *and* we're connected to a Mac.

-->
<GetFileSystemEntries
SessionId="$(BuildSessionId)"
SessionId="$(BuildSessionIdIfConnected)"
DirectoryPath="@(_BindingPackagesFromReferencedAssembliesDirectoriesExists)"
Pattern="*"
Recursive="true"
Expand Down