diff options
author | Kirill Osenkov <github@osenkov.com> | 2018-09-10 21:49:48 +0300 |
---|---|---|
committer | Kirill Osenkov <github@osenkov.com> | 2018-09-10 21:49:48 +0300 |
commit | f32fddf935395e07765fd732878300cb986c2c52 (patch) | |
tree | 8d2107a0d17490559037fbc2241dde5e35dfd8d9 /main/src/tools | |
parent | 61a45fbf6e817cb7c92218eafb9c1cbc8b6807e6 (diff) |
Fix VSTS 669803: using vstool with Razor
vstool/mdtool was not setting the Runtime.MainSynchronizationContext, which in turn didn't set the MainTaskScheduler. Razor addin relies on the MainTaskScheduler being set. Repro: vstool build Foo.sln failed with ArgumentNullException.
Diffstat (limited to 'main/src/tools')
-rw-r--r-- | main/src/tools/mdtool/src/mdtool.cs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/main/src/tools/mdtool/src/mdtool.cs b/main/src/tools/mdtool/src/mdtool.cs index 41f1fcf414..95a70d0c20 100644 --- a/main/src/tools/mdtool/src/mdtool.cs +++ b/main/src/tools/mdtool/src/mdtool.cs @@ -48,6 +48,7 @@ class MonoDevelopProcessHost try { var sc = new ConsoleSynchronizationContext (); SynchronizationContext.SetSynchronizationContext (sc); + Runtime.MainSynchronizationContext = SynchronizationContext.Current; string exeName = Path.GetFileNameWithoutExtension (Assembly.GetEntryAssembly ().Location); if (!Platform.IsMac && !Platform.IsWindows) |