Skip to content

Commit

Permalink
[dotnet] Only include the Xamarin.Shared.Sdk.MultiTarget.targets file…
Browse files Browse the repository at this point in the history
… if it exists. Fixes #16400. (#17498)

Hopefully fixes #16400.
  • Loading branch information
rolfbjarne authored Feb 13, 2023
1 parent 309dbe3 commit bef4867
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</ItemGroup>

<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'MacCatalyst' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) ">
<AfterMicrosoftNETSdkTargets>$(AfterMicrosoftNETSdkTargets);$(_XamarinSdkRootDirectory)..\@NUGET_VERSION_NO_METADATA@\targets\Xamarin.Shared.Sdk.MultiTarget.targets</AfterMicrosoftNETSdkTargets>
<_MultiTargetTargetsFile>$(_XamarinSdkRootDirectory)..\@NUGET_VERSION_NO_METADATA@\targets\Xamarin.Shared.Sdk.MultiTarget.targets</_MultiTargetTargetsFile>
<AfterMicrosoftNETSdkTargets Condition="Exists('$(_MultiTargetTargetsFile)')">$(AfterMicrosoftNETSdkTargets);$(_MultiTargetTargetsFile)</AfterMicrosoftNETSdkTargets>
</PropertyGroup>
</Project>
3 changes: 2 additions & 1 deletion dotnet/Workloads/WorkloadManifest.iOS.template.targets
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
</ItemGroup>

<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'iOS' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) ">
<AfterMicrosoftNETSdkTargets>$(AfterMicrosoftNETSdkTargets);$(_XamarinSdkRootDirectory)..\@NUGET_VERSION_NO_METADATA@\targets\Xamarin.Shared.Sdk.MultiTarget.targets</AfterMicrosoftNETSdkTargets>
<_MultiTargetTargetsFile>$(_XamarinSdkRootDirectory)..\@NUGET_VERSION_NO_METADATA@\targets\Xamarin.Shared.Sdk.MultiTarget.targets</_MultiTargetTargetsFile>
<AfterMicrosoftNETSdkTargets Condition="Exists('$(_MultiTargetTargetsFile)')">$(AfterMicrosoftNETSdkTargets);$(_MultiTargetTargetsFile)</AfterMicrosoftNETSdkTargets>
</PropertyGroup>
</Project>
3 changes: 2 additions & 1 deletion dotnet/Workloads/WorkloadManifest.macOS.template.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</ItemGroup>

<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'macOS' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) ">
<AfterMicrosoftNETSdkTargets>$(AfterMicrosoftNETSdkTargets);$(_XamarinSdkRootDirectory)..\@NUGET_VERSION_NO_METADATA@\targets\Xamarin.Shared.Sdk.MultiTarget.targets</AfterMicrosoftNETSdkTargets>
<_MultiTargetTargetsFile>$(_XamarinSdkRootDirectory)..\@NUGET_VERSION_NO_METADATA@\targets\Xamarin.Shared.Sdk.MultiTarget.targets</_MultiTargetTargetsFile>
<AfterMicrosoftNETSdkTargets Condition="Exists('$(_MultiTargetTargetsFile)')">$(AfterMicrosoftNETSdkTargets);$(_MultiTargetTargetsFile)</AfterMicrosoftNETSdkTargets>
</PropertyGroup>
</Project>
3 changes: 2 additions & 1 deletion dotnet/Workloads/WorkloadManifest.tvOS.template.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</ItemGroup>

<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == 'tvOS' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0')) ">
<AfterMicrosoftNETSdkTargets>$(AfterMicrosoftNETSdkTargets);$(_XamarinSdkRootDirectory)..\@NUGET_VERSION_NO_METADATA@\targets\Xamarin.Shared.Sdk.MultiTarget.targets</AfterMicrosoftNETSdkTargets>
<_MultiTargetTargetsFile>$(_XamarinSdkRootDirectory)..\@NUGET_VERSION_NO_METADATA@\targets\Xamarin.Shared.Sdk.MultiTarget.targets</_MultiTargetTargetsFile>
<AfterMicrosoftNETSdkTargets Condition="Exists('$(_MultiTargetTargetsFile)')">$(AfterMicrosoftNETSdkTargets);$(_MultiTargetTargetsFile)</AfterMicrosoftNETSdkTargets>
</PropertyGroup>
</Project>

4 comments on commit bef4867

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.