@@ -39,6 +39,7 @@ public class EntryPoint
39
39
private System . Diagnostics . Process _process ;
40
40
41
41
private int RemoteControlServerPort ;
42
+ private bool _closing = false ;
42
43
43
44
public EntryPoint ( DTE2 dte2 , string toolsPath , AsyncPackage asyncPackage , Action < Func < Task < Dictionary < string , string > > > > globalPropertiesProvider )
44
45
{
@@ -96,12 +97,36 @@ private void SetupOutputWindow()
96
97
. Add ( UnoPlatformOutputPane ) ;
97
98
}
98
99
99
- _debugAction = s => owPane . OutputString ( "[DEBUG] " + s + "\r \n " ) ;
100
- _infoAction = s => owPane . OutputString ( "[INFO] " + s + "\r \n " ) ;
101
- _infoAction = s => owPane . OutputString ( "[INFO] " + s + "\r \n " ) ;
102
- _verboseAction = s => owPane . OutputString ( "[VERBOSE] " + s + "\r \n " ) ;
103
- _warningAction = s => owPane . OutputString ( "[WARNING] " + s + "\r \n " ) ;
104
- _errorAction = e => owPane . OutputString ( "[ERROR] " + e + "\r \n " ) ;
100
+ _debugAction = s => {
101
+ if ( ! _closing )
102
+ {
103
+ owPane . OutputString ( "[DEBUG] " + s + "\r \n " ) ;
104
+ }
105
+ } ;
106
+ _infoAction = s => {
107
+ if ( ! _closing )
108
+ {
109
+ owPane . OutputString ( "[INFO] " + s + "\r \n " ) ;
110
+ }
111
+ } ;
112
+ _verboseAction = s => {
113
+ if ( ! _closing )
114
+ {
115
+ owPane . OutputString ( "[VERBOSE] " + s + "\r \n " ) ;
116
+ }
117
+ } ;
118
+ _warningAction = s => {
119
+ if ( ! _closing )
120
+ {
121
+ owPane . OutputString ( "[WARNING] " + s + "\r \n " ) ;
122
+ }
123
+ } ;
124
+ _errorAction = e => {
125
+ if ( ! _closing )
126
+ {
127
+ owPane . OutputString ( "[ERROR] " + e + "\r \n " ) ;
128
+ }
129
+ } ;
105
130
106
131
_infoAction ( $ "Uno Remote Control initialized ({ GetAssemblyVersion ( ) } )") ;
107
132
}
@@ -171,6 +196,7 @@ private async Task SolutionEvents_BeforeClosingAsync()
171
196
}
172
197
finally
173
198
{
199
+ _closing = true ;
174
200
_process = null ;
175
201
}
176
202
}
0 commit comments