Skip to content

Commit de2fac2

Browse files
committed
fix: testhost build
1 parent 10685d7 commit de2fac2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/ResponseCaching.Test.WebHost/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
services.AddTransient<TestCustomCacheKeyGenerator>();
5151
services.AddSingleton<TestCustomModelKeyParser>();
5252

53-
#if NET9_0_OR_GREATER
53+
#if DEBUG && NET9_0_OR_GREATER
5454
services.AddOpenApi();
5555
#endif
5656

@@ -60,9 +60,9 @@
6060
{
6161
app.UseDeveloperExceptionPage();
6262

63-
#if NET9_0_OR_GREATER
64-
app.MapOpenApi();
65-
app.MapSwaggerUI();
63+
#if DEBUG && NET9_0_OR_GREATER
64+
app.MapOpenApi();
65+
app.MapSwaggerUI();
6666
#endif
6767
}
6868

0 commit comments

Comments
 (0)