-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Microsoft.NET.EolTargetFrameworks.targets
41 lines (36 loc) · 2.29 KB
/
Microsoft.NET.EolTargetFrameworks.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!--
***********************************************************************************************
Microsoft.NET.EolTargetFrameworks.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
-->
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Default the check to true, but allow developers to turn the warning off. -->
<CheckEolTargetFramework Condition="'$(CheckEolTargetFramework)' == '' and '$(OutputType)' != 'Library'">true</CheckEolTargetFramework>
<CheckEolWorkloads Condition="'$(CheckEolWorkloads)' == ''">true</CheckEolWorkloads>
</PropertyGroup>
<!--
.NET Core framework versions that are currently considered to be end-of-life (EOL). These versions will not be targeted to
receive servicing updates and security fixes.
-->
<ItemGroup>
<_EolNetCoreTargetFrameworkVersions Include="1.0;1.1;2.0;2.1;2.2;3.0;3.1;5.0" />
</ItemGroup>
<PropertyGroup>
<_MinimumNonEolSupportedNetCoreTargetFramework>net6.0</_MinimumNonEolSupportedNetCoreTargetFramework>
</PropertyGroup>
<Target Name="_CheckForEolTargetFrameworks" AfterTargets="_CheckForUnsupportedNETCoreVersion"
Condition="'@(_EolNetCoreTargetFrameworkVersions->AnyHaveMetadataValue('Identity', '$(_TargetFrameworkVersionWithoutV)'))' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(CheckEolTargetFramework)' == 'true'">
<NETSdkWarning ResourceName="TargetFrameworkIsEol"
FormatArguments="$(TargetFramework.ToLowerInvariant());https://aka.ms/dotnet-core-support" />
</Target>
<Target Name="_CheckForEolWorkloads" AfterTargets="_CheckForUnsupportedNETCoreVersion"
Condition="'@(EolWorkload)' != '' and '$(CheckEolWorkloads)' == 'true'">
<NETSdkWarning ResourceName="WorkloadIsEol"
FormatArguments="%(EolWorkload.Identity);$([MSBuild]::ValueOrDefault('%(EolWorkload.Url)', 'https://aka.ms/dotnet-core-support'))" />
</Target>
</Project>