@@ -42,13 +42,15 @@ public static string MuxerPathOrDefault()
42
42
43
43
private static string ? TryFindMuxerPath ( )
44
44
{
45
+ // If not running on Helix, use a custom .NET host, if specified.
46
+ // This allows test projects to use a .NET host with the custom-built
47
+ // ASP.NET Core shared framework.
45
48
if ( string . IsNullOrEmpty ( Environment . GetEnvironmentVariable ( "helix" ) ) )
46
49
{
47
50
var dotNetHostOverride = typeof ( DotNetMuxer ) . Assembly . GetCustomAttributes < AssemblyMetadataAttribute > ( )
48
51
. SingleOrDefault ( a => a . Key == "DotNetHostOverride" ) ? . Value ;
49
52
if ( dotNetHostOverride is not null )
50
53
{
51
- Console . WriteLine ( "Resolved .NET host from DotNetHostOverride metadata attribute: " + dotNetHostOverride ) ;
52
54
return dotNetHostOverride ;
53
55
}
54
56
}
@@ -64,7 +66,6 @@ public static string MuxerPathOrDefault()
64
66
var mainModuleFileName = Path . GetFileName ( mainModuleFullPath ) ;
65
67
if ( string . Equals ( expectedFileName , mainModuleFileName , StringComparison . OrdinalIgnoreCase ) )
66
68
{
67
- Console . WriteLine ( "Resolved .NET host from currently running process: " + mainModuleFullPath ) ;
68
69
return mainModuleFullPath ;
69
70
}
70
71
@@ -77,11 +78,9 @@ public static string MuxerPathOrDefault()
77
78
if ( File . Exists ( candidateDotNetExePath ) )
78
79
{
79
80
var normalizedPath = Path . GetFullPath ( candidateDotNetExePath ) ;
80
- Console . WriteLine ( "Resolved .NET host from CLR location: " + mainModuleFullPath ) ;
81
81
return normalizedPath ;
82
82
}
83
83
84
- Console . WriteLine ( "Could not resolve .NET host: using default value" ) ;
85
84
return null ;
86
85
}
87
86
}
0 commit comments