4242 Visible =" false" />
4343 </ItemGroup >
4444
45- <!-- Properties exclusive to .NET 8 projects -->
46- <PropertyGroup Condition =" $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))" >
47-
48- <!--
49- Enable trimming support. This can't be in a target unlike the other properties
50- set below, because if that is the case the trimmable attribute will be set but
51- the analyzers will not run, so warnings will be skipped.
52- -->
53- <IsAotCompatible >true</IsAotCompatible >
54-
55- <!-- Emit the [DisableRuntimeMarshalling] attribute (also enables the associated analyzer) -->
56- <DisableRuntimeMarshalling >true</DisableRuntimeMarshalling >
57- </PropertyGroup >
58-
59- <!--
60- Emit the [SupportedOSVersion] attribute if needed. Note that the .NET SDK already emits this attribute
61- automatically, but only when targeting the Windows TFM. We use this custom target to emit the same
62- attribute for projects only targeting plain .NET as well. This makes them easier to consume from
63- projects that are not using the Windows TFM as well. Doing so isn't strictly needed anyway unless
64- you're specifically consuming the Windows SDK projections, which those projects are not doing.
65- -->
66- <Target Name =" EmitSupportedOSVersionAttributeForTargetOS"
67- BeforeTargets =" PrepareForBuild" >
68- <ItemGroup Condition =" '$(SupportedOSPlatformVersion)' != '' AND !$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0-windows'))" >
69- <AssemblyAttribute Include =" System.Runtime.Versioning.SupportedOSPlatformAttribute" >
70- <_Parameter1 >Windows$(SupportedOSPlatformVersion)</_Parameter1 >
71- </AssemblyAttribute >
72- </ItemGroup >
73- </Target >
74-
75- <!-- Emit the [ComVisible(false)] attribute for UWP and WinUI targets -->
76- <ItemGroup Condition =" $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0-windows'))" >
77- <AssemblyAttribute Include =" System.Runtime.InteropServices.ComVisibleAttribute" >
78- <_Parameter1 >false</_Parameter1 >
79- </AssemblyAttribute >
80- </ItemGroup >
81-
8245 <!--
8346 The following target has been ported from TerraFX.Interop.Windows.
8447 See: https://github.com/terrafx/terrafx.interop.windows.
9962[module: System.Runtime.CompilerServices.SkipLocalsInitAttribute]]]>
10063 </GeneratedSkipLocalsInitFileLines >
10164 </PropertyGroup >
102-
10365 <Target Name =" GenerateSkipLocalsInit"
10466 BeforeTargets =" BeforeCompile;CoreCompile"
10567 DependsOnTargets =" PrepareForBuild"
11577 <Compile Include =" $(GeneratedSkipLocalsInitFile)" />
11678 </ItemGroup >
11779 </Target >
80+
81+ <!-- Emit an error if our custom 'BeforeMicrosoftNETSdkTargets' .targets file has not been invoked -->
82+ <Target Name =" _ComputeSharpCheckForInvalidBeforeMicrosoftNETSdkTargets"
83+ BeforeTargets =" _CheckForInvalidConfigurationAndPlatform;CoreCompile" >
84+ <Error Condition =" '$(_ComputeSharpBeforeMicrosoftNETSdkTargetsValid)' != 'true'"
85+ Text =" The '_ComputeSharpBeforeMicrosoftNETSdkTargetsValid' marker property is not set." />
86+ </Target >
11887</Project >
0 commit comments