Skip to content

Commit e2e888c

Browse files
timcassellAndreyAkinshin
authored andcommitted
Use Roslyn Toolchain by default if no build settings are changed.
1 parent b035d90 commit e2e888c

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/BenchmarkDotNet/Toolchains/ToolchainExtensions.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,17 @@ private static IToolchain GetToolchain(Job job, Descriptor descriptor)
2828
: GetToolchain(
2929
job.ResolveValue(EnvironmentMode.RuntimeCharacteristic, EnvironmentResolver.Instance),
3030
descriptor,
31-
job.HasValue(InfrastructureMode.NuGetReferencesCharacteristic) || job.HasValue(InfrastructureMode.BuildConfigurationCharacteristic));
31+
job.HasValue(InfrastructureMode.NuGetReferencesCharacteristic)
32+
|| job.HasValue(InfrastructureMode.BuildConfigurationCharacteristic)
33+
|| job.HasValue(InfrastructureMode.ArgumentsCharacteristic));
3234

3335
internal static IToolchain GetToolchain(this Runtime runtime, Descriptor descriptor = null, bool preferMsBuildToolchains = false)
3436
{
3537
switch (runtime)
3638
{
3739
case ClrRuntime clrRuntime:
38-
if (!preferMsBuildToolchains && RuntimeInformation.IsFullFramework &&
39-
// If dotnet SDK is not installed, we use RoslynToolchain.
40-
(!HostEnvironmentInfo.GetCurrent().IsDotNetCliInstalled()
41-
// Integration tests take too much time, because each benchmark run rebuilds the test suite and BenchmarkDotNet itself.
42-
// To reduce the total duration of the CI workflows, we just use RoslynToolchain.
43-
|| XUnitHelper.IsIntegrationTest.Value))
40+
if (!preferMsBuildToolchains && RuntimeInformation.IsFullFramework
41+
&& RuntimeInformation.GetCurrentRuntime().MsBuildMoniker == runtime.MsBuildMoniker)
4442
{
4543
return RoslynToolchain.Instance;
4644
}

0 commit comments

Comments
 (0)