Skip to content

Commit d9c039f

Browse files
jkotaliksebastienros
authored andcommitted
Make IIS benchmarks work again (#1415)
1 parent e702a05 commit d9c039f

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/Benchmarks/Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv" Version="$(MicrosoftAspNetCoreAppPackageVersion)" />
6868
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="$(MicrosoftAspNetCoreAppPackageVersion)" />
6969

70-
<!--<PackageReference Include="Microsoft.AspNetCore.Server.IntegrationTesting.IIS" Version="$(MicrosoftAspNetCoreAppPackageVersion)" />-->
70+
<PackageReference Include="Microsoft.AspNetCore.Server.IntegrationTesting.IIS" Version="5.0.0-alpha1.19468.7" />
7171

7272
<FrameworkReference Update="Microsoft.AspNetCore.App" RuntimeFrameworkVersion="$(MicrosoftAspNetCoreAppPackageVersion)" />
7373

src/Benchmarks/Program.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,16 @@ public static void Main(string[] args)
172172
{
173173
webHostBuilder = webHostBuilder.UseHttpSys();
174174
}
175-
//#if NETCOREAPP2_2 || NETCOREAPP3_0
176-
// else if (String.Equals(Server, "IISInProcess", StringComparison.OrdinalIgnoreCase))
177-
// {
178-
// webHostBuilder = webHostBuilder.UseIIS();
179-
// }
180-
//#endif
181-
// else if (String.Equals(Server, "IISOutOfProcess", StringComparison.OrdinalIgnoreCase))
182-
// {
183-
// webHostBuilder = webHostBuilder.UseKestrel().UseIISIntegration();
184-
// }
175+
#if NETCOREAPP2_2 || NETCOREAPP3_0
176+
else if (String.Equals(Server, "IISInProcess", StringComparison.OrdinalIgnoreCase))
177+
{
178+
webHostBuilder = webHostBuilder.UseIIS();
179+
}
180+
#endif
181+
else if (String.Equals(Server, "IISOutOfProcess", StringComparison.OrdinalIgnoreCase))
182+
{
183+
webHostBuilder = webHostBuilder.UseKestrel().UseIISIntegration();
184+
}
185185
else
186186
{
187187
throw new InvalidOperationException($"Unknown server value: {Server}");

0 commit comments

Comments
 (0)