Skip to content

Commit

Permalink
- Addresses #1567
Browse files Browse the repository at this point in the history
- Completes work started in dotnet/sdk#3438

Removes unsupported TFM's from SupportedTargetFramework.
  • Loading branch information
vatsan-madhavan committed Aug 8, 2019
1 parent 0f2347e commit 733a460
Showing 1 changed file with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,45 @@
<_SDKImplicitReference Include="WindowsFormsIntegration"
Condition=" ('$(UseWindowsForms)' == 'true') And ('$(UseWPF)' == 'true') "/>
</ItemGroup>


<!--
Supported (and unsupported) TargetFrameworks
Visual Studio Project System determines the list of valid TargetFrameworks to show
in the Project properties by querying SupportedTargetFramework values.
The Project System does not refer to this list at this time for .NET Framework TFM's.
-->

<!--
When WindowsDesktop SDK is used without setting UseWPF or UseWinForms, it shows a (suppressible) warning and functions much
like Microsoft.NET.Sdk
Likewise, when WindowsDesktop SDK is used with a netcore TFM that is less than 3.0, it will simply act as if it were an
Microsoft.NET.Sdk project (and show a suppressible build-time warning).
Detect these situations and skip updates to @(SupportedTargetFramework) etc.
-->
<ItemGroup Condition="('$(UseWPF)' == 'true' Or '$(UseWindowsForms)' == 'true') And
'$(_TargetFrameworkVersionWithoutV)' != '' And '$(_TargetFrameworkVersionWithoutV)' >= '$(_WindowsDesktopSdkTargetFrameworkVersionFloor)'">

<!--
Windows Forms and WPF are supported only on .NET Core 3.0+
-->
<_UnsupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v1.0" />
<_UnsupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v1.1" />
<_UnsupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v2.0" />
<_UnsupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v2.1" />
<_UnsupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v2.2" />

<!--
Windows Forms and WPF are not supported an any .NET Standard targets
-->
<_UnsupportedNETStandardTargetFramework Include="@(SupportedNETStandardTargetFramework)" />

<SupportedNETCoreAppTargetFramework Remove="@(_UnsupportedNETCoreAppTargetFramework)" />
<SupportedNETStandardTargetFramework Remove="@(_UnsupportedNETStandardTargetFramework)" />
<SupportedTargetFramework Remove="@(_UnsupportedNETCoreAppTargetFramework);@(_UnsupportedNETStandardTargetFramework)" />
</ItemGroup>
</Project>

0 comments on commit 733a460

Please sign in to comment.