Skip to content

Commit 6812d1d

Browse files
committed
Fix up NativeAoT tests for OpenApi
1 parent 26dcc3b commit 6812d1d

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

eng/testing/linker/project.csproj.template

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
1313
<_ExtraTrimmerArgs>{ExtraTrimmerArgs} $(_ExtraTrimmerArgs)</_ExtraTrimmerArgs>
1414
<InterceptorsPreviewNamespaces>$(InterceptorsPreviewNamespaces);{InterceptorsPreviewNamespacesArgs}</InterceptorsPreviewNamespaces>
15+
<!-- Ensure individual warnings are shown when publishing -->
16+
<TrimmerSingleWarn>false</TrimmerSingleWarn>
17+
<!-- But ignore the single warn files marked below to suppress their known warnings. -->
18+
<NoWarn>$(NoWarn);IL2104</NoWarn>
1519
{AdditionalProperties}
1620
</PropertyGroup>
1721

@@ -23,4 +27,13 @@
2327
{AdditionalProjectReferences}
2428
</ItemGroup>
2529

30+
<Target Name="ConfigureTrimming"
31+
BeforeTargets="PrepareForILLink">
32+
<!-- Single warn the following assemblies, which have known warnings, so the warnings can be suppressed for now. -->
33+
<ItemGroup>
34+
<!-- Remove once https://github.com/microsoft/OpenAPI.NET/pull/1717 is merged. -->
35+
<IlcArg Include="--singlewarnassembly:Microsoft.OpenApi" />
36+
</ItemGroup>
37+
</Target>
38+
2639
</Project>
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<ItemGroup>
4-
<!-- Disable tests in production until https://github.com/microsoft/OpenAPI.NET/pull/1717 is merged and
5-
released in Microsoft.OpenApi -->
6-
<_TestConsoleAppSourceFiles Include="BasicMinimalApiWithOpenApiDependency.cs">
4+
<TestConsoleAppSourceFiles Include="BasicMinimalApiWithOpenApiDependency.cs">
75
<EnabledProperties>EnableRequestDelegateGenerator</EnabledProperties>
86
<InterceptorNamespaces>Microsoft.AspNetCore.Http.Generated</InterceptorNamespaces>
97
<DisabledFeatureSwitches>Microsoft.AspNetCore.Mvc.ApiExplorer.IsEnhancedModelMetadataSupported</DisabledFeatureSwitches>
10-
</_TestConsoleAppSourceFiles>
8+
</TestConsoleAppSourceFiles>
119
</ItemGroup>
1210

1311
</Project>

0 commit comments

Comments
 (0)