Skip to content

Commit

Permalink
Don't import .NET Framework's implementation of WinFX targets
Browse files Browse the repository at this point in the history
When the SDK's implementation is being used.
  • Loading branch information
Nirmal4G committed Jan 8, 2021
1 parent 9edaa39 commit 95fa04f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,13 @@
<SupportedTargetFramework Remove="@(_UnsupportedNETCoreAppTargetFramework);@(_UnsupportedNETStandardTargetFramework);@(_UnsupportedNETFrameworkTargetFramework)" />
</ItemGroup>

<!--
Workaround: https://github.com/microsoft/msbuild/issues/4948
Disable .NET Framework's inbox WinFX targets when using the SDK, since, we really don't use it's build logic
and is superseded by 'WindowsDesktop' SDK that provides it's own WinFX for both NETFX and CoreCLR targets.
-->
<PropertyGroup>
<ImportFrameworkWinFXTargets>false</ImportFrameworkWinFXTargets>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<_MicrosoftNetSdkWindowsDesktop>true</_MicrosoftNetSdkWindowsDesktop>
<_MicrosoftNETSdkWindowsDesktop>true</_MicrosoftNETSdkWindowsDesktop>
<EnableDefaultPageItems Condition="'$(EnableDefaultPageItems)' == ''">true</EnableDefaultPageItems>
<EnableDefaultApplicationDefinition Condition="'$(EnableDefaultApplicationDefinition)' == ''">true</EnableDefaultApplicationDefinition>
<DefaultXamlRuntime Condition="'$(DefaultXamlRuntime)'==''">Wpf</DefaultXamlRuntime>
Expand Down Expand Up @@ -152,7 +152,7 @@
<NetSdkWarning ResourceName="WindowsDesktopFrameworkRequiresVersion30" />
</Target>

<!-- Import WPF Build logic -->
<Import Project="Microsoft.WinFX.targets" />
<!-- Import WPF Build logic only when we don't import NETFX's WinFX targets -->
<Import Project="Microsoft.WinFX.targets" Condition="'$(ImportFrameworkWinFXTargets)' != 'true'"/>

</Project>

0 comments on commit 95fa04f

Please sign in to comment.