|
| 1 | +<!-- |
| 2 | +*********************************************************************************************** |
| 3 | +Eol.targets |
| 4 | +
|
| 5 | +Imported only by .NET 6 EOL projects, contains settings to force the error: |
| 6 | +
|
| 7 | +error NETSDK1202: The workload 'android' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/maui-support-policy for more information about the support policy. |
| 8 | +
|
| 9 | +Things to note: |
| 10 | +
|
| 11 | +* $(WarningsAsErrors) includes NETSDK1202 |
| 12 | +* Force $(TargetPlatformVersion) to just be 21.0, to make it past early error messages |
| 13 | +* _ClearMissingWorkloads prevents undesired extra error messages |
| 14 | +
|
| 15 | +*********************************************************************************************** |
| 16 | +--> |
| 17 | +<Project InitialTargets="_ClearMissingWorkloads"> |
| 18 | + <PropertyGroup> |
| 19 | + <!-- Force NETSDK1202 to be an error --> |
| 20 | + <WarningsAsErrors>$(WarningsAsErrors);NETSDK1202</WarningsAsErrors> |
| 21 | + <!-- |
| 22 | + Along with @(SdkSupportedTargetPlatformVersion), prevents the error: |
| 23 | + Microsoft.NET.TargetFrameworkInference.targets(229,5): |
| 24 | + error NETSDK1140: 31.0 is not a valid TargetPlatformVersion for android. Valid versions include: |
| 25 | + --> |
| 26 | + <TargetPlatformSupported>true</TargetPlatformSupported> |
| 27 | + <TargetPlatformVersion>21.0</TargetPlatformVersion> |
| 28 | + </PropertyGroup> |
| 29 | + <ItemGroup> |
| 30 | + <SdkSupportedTargetPlatformVersion Include="21.0" /> |
| 31 | + <EolWorkload Include="android" Url="https://aka.ms/maui-support-policy" /> |
| 32 | + </ItemGroup> |
| 33 | + <Target Name="_ClearMissingWorkloads"> |
| 34 | + <!-- |
| 35 | + Prevents the error: |
| 36 | + Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: |
| 37 | + To build this project, the following workloads must be installed: wasm-tools-net6 |
| 38 | + To install these workloads, run the following command: dotnet workload restore |
| 39 | + --> |
| 40 | + <ItemGroup> |
| 41 | + <MissingWorkloadPack Remove="@(MissingWorkloadPack)" /> |
| 42 | + </ItemGroup> |
| 43 | + </Target> |
| 44 | +</Project> |
0 commit comments