Skip to content

Commit

Permalink
Added import of .user file for multi-targeted builds (dotnet#9444)
Browse files Browse the repository at this point in the history
Fixes dotnet#9131

Context
As described on the issue, muti-targeted builds did not import the .user file on the outer build. This change makes the outer build import the .user file.

Changes Made
Added import reference to .user file in  Microsoft.Common.CrossTargeting.targets .

Testing
Test is in SDK repo (dotnet/sdk#37192)
  • Loading branch information
maridematte committed Dec 18, 2023
1 parent b0e2b79 commit 01378ef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Tasks/Microsoft.Common.CrossTargeting.targets
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Copyright (C) Microsoft Corporation. All rights reserved.
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.CrossTargeting.targets\ImportBefore\*.targets"
Condition="'$(ImportByWildcardBeforeMicrosoftCommonCrossTargetingTargets)' == 'true' and exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.CrossTargeting.targets\ImportBefore')"/>

<Import Project="$(MSBuildProjectFullPath).user" Condition="Exists('$(MSBuildProjectFullPath).user')"/>

<Import Project="$(CustomBeforeMicrosoftCommonCrossTargetingTargets)" Condition="'$(CustomBeforeMicrosoftCommonCrossTargetingTargets)' != '' and Exists('$(CustomBeforeMicrosoftCommonCrossTargetingTargets)')"/>

<Target Name="GetTargetFrameworks"
Expand Down

0 comments on commit 01378ef

Please sign in to comment.