Files
RobustToolbox/MSBuild/Robust.Properties.targets
PJB3005 7f2ec17651 Okay, the Robust API thing didn't pan out. New plan.
It apparently broke clean builds, as the dependencies aren't in the project asset list or something anymore. I tried to fix this, but it seems impossible to do without relying on .NET SDK internals, as there's no point in the NuGet graph walk process that seems cleanly extensible.

Instead let's just do the much dumber thing: a bunch of .props files for content to import. Hooray!

This also means that I have to go through and *explicitly* disable transitive dependencies everywhere in RT. This thankfully isn't too hard.
2025-12-16 22:56:31 +01:00

48 lines
2.0 KiB
XML

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Properties for both engine and content. -->
<!-- Import this at the end of any project files in Robust and Content. -->
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<RTCullDotnetAnalyzers Condition="'$(RTCullDotnetAnalyzers)' == ''">true</RTCullDotnetAnalyzers>
</PropertyGroup>
<Import Project="Robust.Custom.targets" Condition="Exists('Robust.Custom.targets')"/>
<!-- Configuration logic -->
<Import Project="Robust.Configurations.props" />
<!-- Some platform management logic -->
<Import Project="Robust.Platform.props" />
<PropertyGroup>
<EnableClientScripting>False</EnableClientScripting>
<!-- Client scripting is only enabled on tools builds for security and size reasons. -->
<EnableClientScripting Condition="'$(RobustToolsBuild)' == 'true'">True</EnableClientScripting>
</PropertyGroup>
<!-- built-in define constants -->
<Import Project="Robust.DefineConstants.targets" />
<!-- analyzer -->
<Import Project="Robust.Analyzers.targets" Condition="'$(SkipRobustAnalyzer)' != 'true'" />
<!-- serialization generator -->
<Import Project="Robust.Serialization.Generator.targets" Condition="'$(SkipRobustAnalyzer)' != 'true'" />
<!-- Robust API system -->
<Import Project="Robust.ProjectReferences.targets" />
<!--
We don't use these features and they add a not-insignificant amount of time to build perf.
Am I micro-optimizing? Maybe.
-->
<Target Name="_RTRemoveSlowAnalyzers" BeforeTargets="AfterResolveReferences" Returns="@(Analyzer)">
<ItemGroup Condition="'$(RTCullDotnetAnalyzers)' == 'true'">
<Analyzer Remove="@(Analyzer)" Condition="'%(Analyzer.AssemblyName)' == 'Microsoft.Interop.ComInterfaceGenerator'" />
<Analyzer Remove="@(Analyzer)" Condition="'%(Analyzer.AssemblyName)' == 'Microsoft.Interop.JavaScript.JSImportGenerator'" />
</ItemGroup>
</Target>
</Project>