File tree Expand file tree Collapse file tree 4 files changed +13
-6
lines changed
Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 2929using Google . Protobuf ;
3030using Grpc . Auth ;
3131using Grpc . Core ;
32- using Grpc . Core . Utils ;
3332using Grpc . Net . Client ;
3433using Grpc . Testing ;
3534using Microsoft . Extensions . DependencyInjection ;
3635using Microsoft . Extensions . Logging ;
37- using Microsoft . Extensions . Logging . Console ;
3836using Newtonsoft . Json . Linq ;
3937
4038namespace InteropTestsClient
@@ -101,7 +99,6 @@ private InteropClient(ClientOptions options)
10199 configure . AddSimpleConsole ( loggerOptions =>
102100 {
103101 loggerOptions . IncludeScopes = true ;
104- loggerOptions . ColorBehavior = LoggerColorBehavior . Disabled ;
105102 } ) ;
106103 } ) ;
107104
Original file line number Diff line number Diff line change 1717#endregion
1818
1919using System ;
20+ using System . Reflection ;
2021
2122namespace InteropTestsClient
2223{
@@ -26,6 +27,9 @@ public static void Main(string[] args)
2627 {
2728 Console . WriteLine ( "Application started." ) ;
2829
30+ var runtimeVersion = typeof ( object ) . GetTypeInfo ( ) . Assembly . GetCustomAttribute < AssemblyInformationalVersionAttribute > ( ) ? . InformationalVersion ?? "Unknown" ;
31+ Console . WriteLine ( $ "NetCoreAppVersion: { runtimeVersion } ") ;
32+
2933 InteropClient . Run ( args ) ;
3034 }
3135 }
Original file line number Diff line number Diff line change 2323using Microsoft . Extensions . Configuration ;
2424using Microsoft . Extensions . Hosting ;
2525using Microsoft . Extensions . Logging ;
26- using Microsoft . Extensions . Logging . Console ;
2726
2827namespace InteropTestsWebsite
2928{
@@ -38,7 +37,7 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
3837 Host . CreateDefaultBuilder ( args )
3938 . ConfigureLogging ( builder =>
4039 {
41- builder . AddSimpleConsole ( o => o . ColorBehavior = LoggerColorBehavior . Disabled ) ;
40+ builder . AddSimpleConsole ( ) ;
4241 builder . SetMinimumLevel ( LogLevel . Trace ) ;
4342 } )
4443 . ConfigureWebHostDefaults ( webBuilder =>
Original file line number Diff line number Diff line change 1717#endregion
1818
1919using System ;
20+ using System . Reflection ;
2021using Grpc . Testing ;
2122using Microsoft . AspNetCore . Builder ;
2223using Microsoft . Extensions . DependencyInjection ;
@@ -37,7 +38,13 @@ public void ConfigureServices(IServiceCollection services)
3738 public void Configure ( IApplicationBuilder app , IHostApplicationLifetime applicationLifetime )
3839 {
3940 // Required to notify test infrastructure that it can begin tests
40- applicationLifetime . ApplicationStarted . Register ( ( ) => Console . WriteLine ( "Application started." ) ) ;
41+ applicationLifetime . ApplicationStarted . Register ( ( ) =>
42+ {
43+ Console . WriteLine ( "Application started." ) ;
44+
45+ var runtimeVersion = typeof ( object ) . GetTypeInfo ( ) . Assembly . GetCustomAttribute < AssemblyInformationalVersionAttribute > ( ) ? . InformationalVersion ?? "Unknown" ;
46+ Console . WriteLine ( $ "NetCoreAppVersion: { runtimeVersion } ") ;
47+ } ) ;
4148
4249 app . UseRouting ( ) ;
4350 app . UseEndpoints ( endpoints =>
You can’t perform that action at this time.
0 commit comments