Showing posts with label OutputWindow. Show all posts
Showing posts with label OutputWindow. Show all posts

Tuesday, May 17, 2011

Writing into Visual Studio Output Window. Part 2


In Part 1 we set up OutputWindowWriter class which performs writing to the Visual Studio output window. What else can we add here?
It would be great if everything worked fine from the first attempt, but this not always happens, especially when dialing with someone’s else code. In our situation we have problem - when output window is initially hidden (by auto hide option at the top right corner of the window next to the cross) and we are writing something there we may get something like this
image

Tuesday, April 12, 2011

Writing into Visual Studio Output Window. Part 1


Lets assume that we have some Visual Studio 2010 Isolated Shell application (I suppose everything mentioned here should be valid for ordinary vspackages, but didn’t test, so cannot be sure). It may perform some operations (actually it is usually written to perform some operation, isn’t it?) and our task is to put log of these operations somewhere. Visual Studio has such nice feature like output window. And it is perfect candidate for such log, so post creates simple class to make it easy to write anything into log.