From 87c4da41e8440554119a8331b76c21ba2065e952 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sun, 21 May 2017 16:46:47 -0700 Subject: [PATCH] Disabling hosting startup - VS injects a bad version of AppInsights because it doesn't check the shared framework version in use. Since we constantly are on the bleeding edge, we get out of sync frequently. This change disables them from running. --- samples/ChatSample/Program.cs | 1 + samples/SocialWeather/Program.cs | 1 + samples/SocketsSample/Program.cs | 1 + 3 files changed, 3 insertions(+) diff --git a/samples/ChatSample/Program.cs b/samples/ChatSample/Program.cs index f6c7a1102c..757fbb32cd 100644 --- a/samples/ChatSample/Program.cs +++ b/samples/ChatSample/Program.cs @@ -12,6 +12,7 @@ namespace ChatSample public static void Main(string[] args) { var host = new WebHostBuilder() + .UseSetting(WebHostDefaults.PreventHostingStartupKey, "true") .ConfigureLogging((context, factory) => { factory.UseConfiguration(context.Configuration.GetSection("Logging")); diff --git a/samples/SocialWeather/Program.cs b/samples/SocialWeather/Program.cs index d25c80a04c..426f89226b 100644 --- a/samples/SocialWeather/Program.cs +++ b/samples/SocialWeather/Program.cs @@ -12,6 +12,7 @@ namespace SocialWeather public static void Main(string[] args) { var host = new WebHostBuilder() + .UseSetting(WebHostDefaults.PreventHostingStartupKey, "true") .ConfigureLogging(factory => { factory.AddConsole(); diff --git a/samples/SocketsSample/Program.cs b/samples/SocketsSample/Program.cs index 5f2bafdbc4..aa6c67a8fe 100644 --- a/samples/SocketsSample/Program.cs +++ b/samples/SocketsSample/Program.cs @@ -18,6 +18,7 @@ namespace SocketsSample var host = new WebHostBuilder() .UseConfiguration(config) + .UseSetting(WebHostDefaults.PreventHostingStartupKey, "true") .ConfigureLogging(factory => { factory.AddConsole();