Skip to content

Commit

Permalink
Fix up NativeAoT tests for OpenApi
Browse files Browse the repository at this point in the history
  • Loading branch information
captainsafia committed Jul 17, 2024
1 parent 26dcc3b commit 6812d1d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
13 changes: 13 additions & 0 deletions eng/testing/linker/project.csproj.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
<_ExtraTrimmerArgs>{ExtraTrimmerArgs} $(_ExtraTrimmerArgs)</_ExtraTrimmerArgs>
<InterceptorsPreviewNamespaces>$(InterceptorsPreviewNamespaces);{InterceptorsPreviewNamespacesArgs}</InterceptorsPreviewNamespaces>
<!-- Ensure individual warnings are shown when publishing -->
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<!-- But ignore the single warn files marked below to suppress their known warnings. -->
<NoWarn>$(NoWarn);IL2104</NoWarn>
{AdditionalProperties}
</PropertyGroup>

Expand All @@ -23,4 +27,13 @@
{AdditionalProjectReferences}
</ItemGroup>

<Target Name="ConfigureTrimming"
BeforeTargets="PrepareForILLink">
<!-- Single warn the following assemblies, which have known warnings, so the warnings can be suppressed for now. -->
<ItemGroup>
<!-- Remove once https://github.com/microsoft/OpenAPI.NET/pull/1717 is merged. -->
<IlcArg Include="--singlewarnassembly:Microsoft.OpenApi" />
</ItemGroup>
</Target>

</Project>
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<!-- Disable tests in production until https://github.com/microsoft/OpenAPI.NET/pull/1717 is merged and
released in Microsoft.OpenApi -->
<_TestConsoleAppSourceFiles Include="BasicMinimalApiWithOpenApiDependency.cs">
<TestConsoleAppSourceFiles Include="BasicMinimalApiWithOpenApiDependency.cs">
<EnabledProperties>EnableRequestDelegateGenerator</EnabledProperties>
<InterceptorNamespaces>Microsoft.AspNetCore.Http.Generated</InterceptorNamespaces>
<DisabledFeatureSwitches>Microsoft.AspNetCore.Mvc.ApiExplorer.IsEnhancedModelMetadataSupported</DisabledFeatureSwitches>
</_TestConsoleAppSourceFiles>
</TestConsoleAppSourceFiles>
</ItemGroup>

</Project>

0 comments on commit 6812d1d

Please sign in to comment.