<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.wintellect.com/cs/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">John Robbins' Blog</title><subtitle type="html" /><id>http://www.wintellect.com/cs/blogs/jrobbins/atom.aspx</id><link rel="alternate" type="text/html" href="http://www.wintellect.com/cs/blogs/jrobbins/default.aspx" /><link rel="self" type="application/atom+xml" href="http://www.wintellect.com/cs/blogs/jrobbins/atom.aspx" /><generator uri="http://communityserver.org" version="2.1.61129.2">Community Server</generator><updated>2012-01-06T16:29:23Z</updated><entry><title>Using NuGet PowerShell to Replace Missing Macros in Dev 11</title><link rel="alternate" type="text/html" href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/03/30/using-nuget-powershell-to-replace-missing-macros-in-dev-11.aspx" /><id>http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/03/30/using-nuget-powershell-to-replace-missing-macros-in-dev-11.aspx</id><published>2012-03-30T20:55:13Z</published><updated>2012-03-30T20:55:13Z</updated><content type="html">&lt;p&gt;When I first heard that macros were being &lt;a href="http://www.infoq.com/news/2011/10/VS-Macros"&gt;dropped&lt;/a&gt; from Dev 11 I was gobsmacked. (I just love that world!) While the macro story up to Visual Studio 2010 wasn’t great because we couldn’t write macros in our .NET language of choice, I expected the situation would start getting better and was saddened when the fix was to remove the easy customizability all together.&lt;/p&gt;  &lt;p&gt;People at Microsoft said that the code behind macros was too brittle to update and their telemetry said macros are feature no one was using. My theory is the reason people skipped macros are because you had to do it in a different language. (VB people: I’m not criticizing VB but most of the developers who would write macros are C#/C++ developers). By dropping macros, the argument was that there was still a valid way to extend the development environment with .VSX files. That’s great but like I really want to install an SDK, write a VSX and have Dev 11 debugging Dev 11 just to enumerate my projects and add a new define to debug build configurations.&lt;/p&gt;  &lt;p&gt;Readers of this blog know I’ve written many macros (&lt;a href="http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/07/17/automatically-freezing-threads-brrrrr.aspx"&gt;examples&lt;/a&gt; &lt;a href="http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/07/13/easier-multithreaded-debugging.aspx"&gt;here&lt;/a&gt;) that make debugging in particular easier. I use my macros on a daily basis so was not looking forward to porting them to an extension and all the junk that entails. As I was navigating the file system using the now built in NuGet Package Manager Console window, why not use PowerShell as the macro language? While this works, I’ll still be pestering Microsoft a lot during the Dev 12 development cycle for a real macro system that lets me program in any .NET language.&lt;/p&gt;  &lt;p&gt;To use PowerShell as the macro language, you need access to the Visual Studio automation model. In macros and extensions the root of life is the &lt;a href="http://msdn.microsoft.com/en-us/library/envdte.dte.aspx"&gt;DTE interface&lt;/a&gt;. A quick look at the variables defined in the Package Manager Console shows a $dte variable so once you have that, you’ve got everything! That’s nice when things are easy. &lt;/p&gt;  &lt;p&gt;My goal was to port all my macros over to PowerShell and you can see the results of my porting efforts at the bottom of this blog entry. For the most part, it was simply a matter of porting VB to PowerShell, which wasn’t too onerous if you know PowerShell. The main drawback I encountered is that to debug any functions you write you have to use the old PowerShell 1.0 way of debugging with Set-PSDebug and all the fun of command line debugging. It’s a bit painful, but it does work. &lt;/p&gt;  &lt;p&gt;There were two areas where I got stumped during the porting. The first was in converting interfaces. When accessing the breakpoints in PowerShell, you use $dte.Debugger.Breakpoints. However, that returns the original IBreakpoints interface defined back in Visual Studio 2003. However, if you want to access the Filterby property, you need the IBreakpoints2 interface defined in Visual Studio 2005. As PowerShell’s COM implementation only works with IDispatch, and not explicit interface members, I was not sure I could get everything to work if I couldn’t convert. Fortunately, the NuGet developers already thought of this and provided the &lt;a href="http://docs.nuget.org/docs/start-here/nuget-faq"&gt;Get-Interface&lt;/a&gt; cmdlet that allows easy conversion. The following snippet shows converting an IBreakpoints interface into the IBreakpoints2 interface.&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:2d8ce7df-6284-4e0d-a442-79daf834e943" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#fff;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt; &lt;li&gt;Get-Interface $dte.Debugger.Breakpoints[0] ([ENVDTE80.Breakpoint2])&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;The second problem in porting I encountered was trying to use a Visual Studio method like $dte.Breakpoints.&lt;a href="http://msdn.microsoft.com/en-us/library/envdte.breakpoints.add.aspx"&gt;Add&lt;/a&gt;, which takes many optional and conflicting parameters. That’s easy to do in VB, but PowerShell sort of likes you to use all the parameters to a COM method. A bit of careful web searching lead me to a great &lt;a href="http://stackoverflow.com/questions/5544844/how-to-call-a-complex-com-method-from-powershell"&gt;solution&lt;/a&gt; by Jason Archer where he uses some seriously ninja PowerShell tricks to solve the problem. If you want to learn some advanced PowerShell, look at &lt;a href="http://stackoverflow.com/questions/5544844/how-to-call-a-complex-com-method-from-powershell"&gt;Invoke-NamedParameter&lt;/a&gt; function.&lt;/p&gt;  &lt;p&gt;By using the Package Manager Console, I thought packaging up my cmdlets as a NuGet package would be the way to go. The only problem is that a NuGet package is designed to be used with a solution, which is the correct approach, but I wanted my cmdlets to be available at all times. To that end I chose to go with a PowerShell module, which works just fine with the Package Manager Console. &lt;/p&gt;  &lt;p&gt;You can put the files in the download anywhere you want, but if you would like to include them in the module path, use Install-Module.PS1 to do the installation. &lt;/p&gt;  &lt;p&gt;It looks like there’s a bug in the NuGet Package Manager Console because the $ENV:PSModulePath does not include the normal user’s documents directory in the default path. Consequently, to run Install-Module.PS1 you will need to run Dev 11 elevated to do the installation as the NuGet modules directory is in Program Files.&lt;/p&gt;  &lt;p&gt;If you’re still using Visual Studio 2010 and you want to try out my cmdlets, please do as they all work provided you installed NuGet. If you have any questions or ideas for other macros, please don’t hesitate to let me know.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.wintellect.com/CS/files/folders/20776/download.aspx"&gt;Download WintellectVSCmdlets&lt;/a&gt;.&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:35e7173f-09fe-4db6-8b4d-91530a97fcc9" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#fff;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt; &lt;li&gt;TOPIC&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    about_WintellectVSCmdlets&lt;/li&gt; &lt;li&gt;    &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;SHORT DESCRIPTION&lt;/li&gt; &lt;li&gt;    Provides missing functionality, especially around debugging, to Visual Studio 2010 and Dev 11.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;           &lt;/li&gt; &lt;li&gt;LONG DESCRIPTION&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    This describes the basic commands included in the WintellectVSCmdlets module. With Dev 11 not offering&lt;/li&gt; &lt;li&gt;    macros, simple extensions require installing an SDK and debugging the extensions with a second instance&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    of the IDE. In all, it makes for a very poor experience when you want to do simple customization of the &lt;/li&gt; &lt;li&gt;    the development environment.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;/li&gt; &lt;li&gt;    These macros, which are very useful for debugging, demostrate that the NuGet Package Console is &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    sufficient for many of your customization needs. Most of these cmdlets are ports of VB.NET macros that &lt;/li&gt; &lt;li&gt;    John Robbins has shown on his blog and books.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;/li&gt; &lt;li&gt;    All cmdlets work with both Visual Studio 2010 and Dev 11.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    &lt;/li&gt; &lt;li&gt;    Note that these cmdlets support C#, VB, and native C++. They probably support more but those were&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    all the languages tested.&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    If you have any questions, suggestions, or bug reports, please contact John at john@wintellect.com.&lt;/li&gt; &lt;li&gt;                 &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    The following Wintellect VS cmdlets are included.&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        Cmdlet                                            Description&lt;/li&gt; &lt;li&gt;        ------------------                                ----------------------------------------------&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        Add-BreakpointsOnAllDocMethods                  Sets breakpoints on methods in the current code document. This&lt;/li&gt; &lt;li&gt;                                                        is very useful in .NET languages as the debugger expression &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                                                        evaluator does not support that.&lt;/li&gt; &lt;li&gt;                                                        &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        Remove-BreakpointsOnAllDocMethods               Removes all the breakpoints set with Add-BreakpointsOnAllDocMethods.&lt;/li&gt; &lt;li&gt;                                                        This cmdlet will not remove any of your breakpoints.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;/li&gt; &lt;li&gt;        Add-InterestingThreadFilterToBreakpoints        Adds the filter &amp;quot;ThreadName==InterestingThread&amp;quot; to all breakpoints to&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                                                        make it easier to debug through a single transaction.&lt;/li&gt; &lt;li&gt;                                                        &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        Remove-InterestingThreadFilterFromBreakpoints   Removes the &amp;quot;ThreadName==InterestingThread&amp;quot; filter applied with&lt;/li&gt; &lt;li&gt;                                                        Add-InterestingThreadFilterToBreakpoints.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;        Disable-NonActiveThreads                        Freezes all but the active thread so you can single step to the end&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                                                        of a method without dramatically bouncing to another thread when you &lt;/li&gt; &lt;li&gt;                                                        least expect it.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                                                        &lt;/li&gt; &lt;li&gt;        Resume-NonActiveThreads                         Thaws all threads previously frozen with Disable-NonActiveThreads.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;        Get-Breakpoints                                 Returns the latest version of the IBreakpoints derived list.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;/li&gt; &lt;li&gt;        Get-Threads                                     Returns all the threads.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        &lt;/li&gt; &lt;li&gt;        Invoke-NamedParameter                           A wonderful cmdlet that lets you easily call methods with many&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                                                        optional parameters. Full credit to Jason Archer for this cmdlet.&lt;/li&gt; &lt;li&gt;        &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        Invoke-WinDBG                                   VS/Dev 11 have ease of use, where WinDBG (with SOS + SOSEX) have &lt;/li&gt; &lt;li&gt;                                                        tons of power to tell you what&amp;#39;s going on in your application. This&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                                                        cmdlet starts WinDBG on the process you&amp;#39;re currently debugging in the&lt;/li&gt; &lt;li&gt;                                                        IDE so you can have the best of both worlds.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                                                        &lt;/li&gt; &lt;li&gt;        Open-LastIntelliTraceRecording                  When you stop debugging, your current IntelliTrace log disappears. This&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;                                                        cmdlet fixes that by opening the last log you produced so you can post-mortem&lt;/li&gt; &lt;li&gt;                                                        look at your debugging session.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;SEE ALSO&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    Online help and updates: http://www.wintellect.com/CS/blogs/jrobbins/default.aspx&lt;/li&gt; &lt;li&gt;    Add-BreakpointsOnAllDocMethods&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    Remove-BreakpointsOnAllDocMethods&lt;/li&gt; &lt;li&gt;    Add-InterestingThreadFilterToBreakpoints&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    Remove-InterestingThreadFilterFromBreakpoints&lt;/li&gt; &lt;li&gt;    Disable-NonActiveThreads&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    Resume-NonActiveThreads&lt;/li&gt; &lt;li&gt;    Get-Breakpoints&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    Get-Threads&lt;/li&gt; &lt;li&gt;    Invoke-NamedParameter&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    Invoke-WinDBG&lt;/li&gt; &lt;li&gt;    Open-LastIntelliTraceRecording&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;img src="http://www.wintellect.com/cs/aggbug.aspx?PostID=20777" width="1" height="1"&gt;</content><author><name>jrobbins</name><uri>http://www.wintellect.com/cs/members/jrobbins.aspx</uri></author><category term="Debugging" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Debugging/default.aspx" /><category term="Visual Studio" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Visual+Studio/default.aspx" /></entry><entry><title>Get Your Next Job Here!!</title><link rel="alternate" type="text/html" href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/03/16/get-your-next-job-here.aspx" /><id>http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/03/16/get-your-next-job-here.aspx</id><published>2012-03-16T20:34:22Z</published><updated>2012-03-16T20:34:22Z</updated><content type="html">&lt;p&gt;We are growing like crazy at Wintellect and want you to work for us! We’d prefer full time employment, but would be happy to also work with some of you excellent independent contractors. At this time we need candidates to be based in North America. What we are looking for are excellent project managers and developers who thrive on challenging work, can work independently, and have excellent communications skills. We don’t care where you live in North America either as we have people all over the US.&lt;/p&gt;  &lt;p&gt;The raw skills we want are ASP.NET MVC, C#, SQL, and WCF. If you’ve just read about those technologies in a book (maybe even one we wrote), that’s not good enough. You need to have a track record of shipping code and open source counts big with us. Please forward your resume and availability to Barbara Keihm, Director of Human Resources, &lt;a href="mailto:bkeihm@wintellect.com?subject=IwanttoworkatWintellect!"&gt;bkeihm@wintellect.com&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.wintellect.com/cs/aggbug.aspx?PostID=20693" width="1" height="1"&gt;</content><author><name>jrobbins</name><uri>http://www.wintellect.com/cs/members/jrobbins.aspx</uri></author><category term="Wintellect" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Wintellect/default.aspx" /></entry><entry><title>Updated PowerShell Scripts to Manage Symbol Server and Source Server Settings</title><link rel="alternate" type="text/html" href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/03/13/updated-powershell-scripts-to-manage-symbol-server-and-source-server-settings.aspx" /><id>http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/03/13/updated-powershell-scripts-to-manage-symbol-server-and-source-server-settings.aspx</id><published>2012-03-14T00:28:47Z</published><updated>2012-03-14T00:28:47Z</updated><content type="html">&lt;p&gt;With Dev 11 Beta now in our hot little hands, I needed to update my symbol server and source server PowerShell scripts that automate setting up a developer machine. I’ve packaged up all the scripts previously published on this blog into a module, WintellectPowerShell, to make the cmdlets easier to use.&lt;/p&gt;  &lt;p&gt;To set up a development machine to use a symbol server, use the Set-SymbolServer command. It takes care of setting the _NT_SYMBOL_PATH environment variable, as well as Visual Studio 2010 and Dev 11 Beta provided they are installed. The Set-SourceServer command sets up both VS 2010 and Dev 11, but also will set the _NT_SOURCE_PATH environment variable so WinDBG can pick up the source from your version control system as well. Yes, you C++ folks, these scripts support you as well!&lt;/p&gt;  &lt;p&gt;I’ve also included an update version of my Get-SysinternalsSuite script that will download and extract all the wonderful Sysinternals tools. My previous version of the script relied on an external zip tool, but now used the Shell’s zip provider. There are a few other commands in the module for getting the current symbol server and source server values. The help is shown below and the download is &lt;a href="http://www.wintellect.com/CS/files/folders/20686/download.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;As always let me know if you find any bugs or have suggestions!&lt;/p&gt;  &lt;p&gt;No discussion of PowerShell would be complete without a one-liner that does a lot. I wanted to show the help in this post so you could see all the commands. Once you have a module loaded, you can get the help simply by doing the following:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9383c5b4-402d-4298-8deb-5d1ef65abec5" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#fff;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt; &lt;li&gt;(get-module WintellectPowerShell).ExportedFunctions.Keys | sort | foreach-object { Get-Help detailed $_}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;I thought that was pretty cool!&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d9dfb3b5-2a6b-42b9-b15f-732a0c5289da" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#fff;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt; &lt;li&gt;NAME&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    Expand-ZipFile&lt;/li&gt; &lt;li&gt;SYNOPSIS&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    Expands a .ZIP file to the specified directory.&lt;/li&gt; &lt;li&gt;SYNTAX&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    Expand-ZipFile [-ZipFile] &amp;lt;String&amp;gt; [-Destination] &amp;lt;String&amp;gt; [&amp;lt;CommonParameters&amp;gt;]&lt;/li&gt; &lt;li&gt;DESCRIPTION&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    Using no external ZIP utilities, expands a .ZIP file to a specified directory.&lt;/li&gt; &lt;li&gt;PARAMETERS&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    -ZipFile &amp;lt;String&amp;gt;&lt;/li&gt; &lt;li&gt;        The .ZIP file to expand.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    -Destination &amp;lt;String&amp;gt;&lt;/li&gt; &lt;li&gt;        The output directory for the ZipFile. If this directory does not exist, it will&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        be created.&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;NAME&lt;/li&gt; &lt;li&gt;    Get-SourceServer&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;SYNOPSIS&lt;/li&gt; &lt;li&gt;    Returns a hashtable of the current source server settings..&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;SYNTAX&lt;/li&gt; &lt;li&gt;    Get-SourceServer [&amp;lt;CommonParameters&amp;gt;]&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;DESCRIPTION&lt;/li&gt; &lt;li&gt;    Returns a hashtable with the current source server directories settings&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    for VS 2010, Dev 11 Beta, and the _NT_SOURCE_PATH enviroment variable used &lt;/li&gt; &lt;li&gt;    by WinDBG.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;NAME&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    Get-SourceServerFiles&lt;/li&gt; &lt;li&gt;SYNOPSIS&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    Prepopulate your symbol cache with all your Source Server extracted source &lt;/li&gt; &lt;li&gt;    code.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;SYNTAX&lt;/li&gt; &lt;li&gt;    Get-SourceServerFiles [-CacheDirectory] &amp;lt;String&amp;gt; [[-SrcTool] &amp;lt;String&amp;gt;] [&amp;lt;CommonParameters&amp;gt;]&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;DESCRIPTION&lt;/li&gt; &lt;li&gt;    Recurses the specified symbol cache directory for PDB files with Source Server&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    sections and extracts the source code. This script is a simple wrapper around &lt;/li&gt; &lt;li&gt;    SRCTOOl.EXE from the Debugging Tools for Windows (AKA WinDBG). If WinDBG is in &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    the PATH this script will find SRCTOOL.EXE. If WinDBG is not in your path, use&lt;/li&gt; &lt;li&gt;    the SrcTool parameter to specify the complete path to the tool.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;PARAMETERS&lt;/li&gt; &lt;li&gt;    -CacheDirectory &amp;lt;String&amp;gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        The required cache directory for the local machine.&lt;/li&gt; &lt;li&gt;    -SrcTool &amp;lt;String&amp;gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        The optional parameter to specify where SRCTOOL.EXE resides.&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;NAME&lt;/li&gt; &lt;li&gt;    Get-SymbolServer&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;SYNOPSIS&lt;/li&gt; &lt;li&gt;    Returns a hashtable of the current symbol server settings.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;SYNTAX&lt;/li&gt; &lt;li&gt;    Get-SymbolServer [&amp;lt;CommonParameters&amp;gt;]&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;DESCRIPTION&lt;/li&gt; &lt;li&gt;    Returns a hashtable with the current source server directories settings&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    for VS 2010, Dev 11 Beta, and the _NT_SYMBOL_PATH enviroment variable.&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;NAME&lt;/li&gt; &lt;li&gt;    Get-SysinternalsSuite&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;SYNOPSIS&lt;/li&gt; &lt;li&gt;    Gets all the wonderful Sysinternals tools&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;SYNTAX&lt;/li&gt; &lt;li&gt;    Get-SysinternalsSuite [-Extract] &amp;lt;String&amp;gt; [[-Save] &amp;lt;String&amp;gt;] [&amp;lt;CommonParameters&amp;gt;]&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;DESCRIPTION&lt;/li&gt; &lt;li&gt;    Downloads and extracts the Sysinternal tools to the directory you specify.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;PARAMETERS&lt;/li&gt; &lt;li&gt;    -Extract &amp;lt;String&amp;gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        The directory where you want to extract the Sysinternal tools.&lt;/li&gt; &lt;li&gt;    -Save &amp;lt;String&amp;gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        The default is to download the SysinternalsSuite.zip file and remove it after&lt;/li&gt; &lt;li&gt;        extracting the contents. If you want to keep the file, specify the save &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        directory with this parameter.&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;NAME&lt;/li&gt; &lt;li&gt;    Get-Uptime&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;SYNOPSIS&lt;/li&gt; &lt;li&gt;    Returns how long a computer has been running.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;SYNTAX&lt;/li&gt; &lt;li&gt;    Get-Uptime [[-computerName] &amp;lt;String&amp;gt;] [&amp;lt;CommonParameters&amp;gt;]&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;DESCRIPTION&lt;/li&gt; &lt;li&gt;    Returns the TimeSpan for how long a computer is running. If you&amp;#39;d like it &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    formatted you can use &amp;quot;Get-Uptime -f {0}&amp;quot;&lt;/li&gt; &lt;li&gt;PARAMETERS&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    -computerName &amp;lt;String&amp;gt;&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;NAME&lt;/li&gt; &lt;li&gt;    Set-SourceServer&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;SYNOPSIS&lt;/li&gt; &lt;li&gt;    Sets the source server directory.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;SYNTAX&lt;/li&gt; &lt;li&gt;    Set-SourceServer [-Directory] &amp;lt;String&amp;gt; [&amp;lt;CommonParameters&amp;gt;]&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;DESCRIPTION&lt;/li&gt; &lt;li&gt;    Sets the source server cache directory for VS 2010, Dev 11 Beta, and WinDBG &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    through the _NT_SOURCE_PATH environment variable to all reference the same &lt;/li&gt; &lt;li&gt;    location. This ensures you only download the file once no matter which &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    debugger you use. Because this cmdlet sets an environment variable you &lt;/li&gt; &lt;li&gt;    need to log off to ensure it&amp;#39;s properly set.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;PARAMETERS&lt;/li&gt; &lt;li&gt;    -Directory &amp;lt;String&amp;gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        The directory to use. If the directory does not exist, it will be created.&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;NAME&lt;/li&gt; &lt;li&gt;    Set-SymbolServer&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;SYNOPSIS&lt;/li&gt; &lt;li&gt;    Sets up a computer to use a symbol server.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;SYNTAX&lt;/li&gt; &lt;li&gt;    Set-SymbolServer [-Internal] [-Public] [[-CacheDirectory] &amp;lt;String&amp;gt;] [[-SymbolServers] &amp;lt;String[]&amp;gt;] [-WhatIf] [-Confi&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    rm] [&amp;lt;CommonParameters&amp;gt;]&lt;/li&gt; &lt;li&gt;DESCRIPTION&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    Sets up both the _NT_SYMBOL_PATH environment variable as well as Visual Studio &lt;/li&gt; &lt;li&gt;    2010 and Dev 11 Beta (if installed) to use a common symbol cache directory as &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    well as common symbol servers.&lt;/li&gt; &lt;li&gt;PARAMETERS&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    -Internal [&amp;lt;SwitchParameter&amp;gt;]&lt;/li&gt; &lt;li&gt;        Sets the symbol server to use to http://SymWeb. Visual Studio will not use &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        the public symbol servers. This will turn off the .NET Framework Source &lt;/li&gt; &lt;li&gt;        Stepping. This switch is intended for internal Microsoft use only.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        You must specify either -Internal or -Public to the script.&lt;/li&gt; &lt;li&gt;    -Public [&amp;lt;SwitchParameter&amp;gt;]&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        Sets the symbol server to use as the two public symbol servers from Microsoft. &lt;/li&gt; &lt;li&gt;        All the appropriate settings are configured to properly have .NET Reference &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        Source stepping working.&lt;/li&gt; &lt;li&gt;    -CacheDirectory &amp;lt;String&amp;gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        Defaults to C:&amp;#92;SYMBOLS&amp;#92;PUBLIC&amp;#92;MicrosoftPublicSymbols for -Public and &lt;/li&gt; &lt;li&gt;        C:&amp;#92;SYMBOLS&amp;#92;INTERNAL for -Internal.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;    -SymbolServers &amp;lt;String[]&amp;gt;&lt;/li&gt; &lt;li&gt;        A string array of additional symbol servers to use. If -Internal is set, these &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        additional symbol servers will appear after HTTP://SYMWEB. If -Public is &lt;/li&gt; &lt;li&gt;        set, these symbol servers will appear after the public symbol servers so both&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;        the environment variable and Visual Studio have the same search order.&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;img src="http://www.wintellect.com/cs/aggbug.aspx?PostID=20687" width="1" height="1"&gt;</content><author><name>jrobbins</name><uri>http://www.wintellect.com/cs/members/jrobbins.aspx</uri></author><category term="Debugging" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Debugging/default.aspx" /><category term="PowerShell" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/PowerShell/default.aspx" /></entry><entry><title>What’s New in SOS for .NET 4.5?</title><link rel="alternate" type="text/html" href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/03/08/what-s-new-in-sos-for-net-4-5.aspx" /><id>http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/03/08/what-s-new-in-sos-for-net-4-5.aspx</id><published>2012-03-08T21:27:57Z</published><updated>2012-03-08T21:27:57Z</updated><content type="html">&lt;p&gt;One of these days Microsoft will release a version of .NET where we don’t have to worry about memory. HA! Who am I kidding!? All you worry about in a .NET application is the memory. Naturally, I personally never want Microsoft to come out with the memory worry free .NET because I’d be out of a job.&lt;/p&gt;  &lt;p&gt;With SOS for .NET 4.5, there’s not a whole lot different but there are two differences that will be valuable. The first are two new options to the most important SOS command, !dumpheap. One of the big problems in dealing with those minidumps from production systems is trying to figure out which objects are rooted, meaning have references and cannot be garbage collected, and those objects that are ready for garbage collection. That problem is easy to solve with the new –live and –dead options. Get in the habit now of always passing –live when you first do that initial !dumpheap –stat because that’s all you care about!&lt;/p&gt;  &lt;p&gt;Here’s an example output comparing the differences reported by –stat alone, -live, and –dead.&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:f4858c7a-250e-4474-b0dd-a39c28603a6d" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#fff;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt; &lt;li&gt;&amp;gt;0:000 !dumpheap stat&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;. . .&lt;/li&gt; &lt;li&gt;000007feefedadd8    21567      2616488 System.Object[]&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;000007feeff34198   336164      8067936 System.Int32&lt;/li&gt; &lt;li&gt;Total 509034 objects&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;&amp;gt;0:000 !dumpheap stat live&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;. . .&lt;/li&gt; &lt;li&gt;000007feefedadd8      135       285048 System.Object[]&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;000007feeff2d8f0    19703       472872 System.WeakReference&lt;/li&gt; &lt;li&gt;Total 22711 objects&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;&amp;gt;0:000 !dumpheap stat dead&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;. . .&lt;/li&gt; &lt;li&gt;000007feefedadd8    21432      2331440 System.Object[]&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;000007feeff34198   336158      8067792 System.Int32&lt;/li&gt; &lt;li&gt;Total 486286 objects&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;What I haven’t been able to figure out is that the total objects between live and dead objects never add up to the total shown when looking at all objects with just the –stat switch. Doing some experimentation the output for –live looks valid so I’m going to trust it for now. I’ll talk to the CLR team and see if this is a bug or there’s a real reason for the discrepancy. It’s not like an object could be alive and dead at the same time… unless it was a ZOMBIE! No matter, the –live switch looks fantastic and will save everyone a huge amount of time.&lt;/p&gt;  &lt;p&gt;Since everyone is not moving over to .NET 4.5 immediately, I tried like crazy to see if I could get the .NET 4.5 SOS version working with minidumps from .NET 4.0. Nothing I tried and no amount of playing around with .cordll to load the MSCORDACWKS.DLL from .NET 4.0 would work. Do yourself a favor now and make sure you save off SOS.DLL, CLR.DLL, and MSCORDACWKS.DLL from a pure .NET 4.0 installation because .NET 4.5 is on top of .NET 4.0. I’ll keep working on trying more tricks to get !dumpheap –live working with .NET 4.0.&lt;/p&gt;  &lt;p&gt;The second SOS command to get some development love is !clrstack. There’s a new experimental option –i, which uses the CLR Debugging API’s ICorDebug interface to walk stacks and show variable names very much like the !mk command in &lt;a href="http://stevestechspot.com/"&gt;SOSEX&lt;/a&gt;. It’s very important that to use !clrstack –i you have the _NT_SYMBOL_PATH environment variable set to include the public Microsoft symbol server. SOS needs access to MSCORDBI.DLL through the symbol server download even though that DLL is in the framework directory along with SOS.DLL. &lt;/p&gt;  &lt;p&gt;Running !clrstack –a –i will show output like the following snippet. What you can’t see is that the output is that it’s fully DML ready.&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6c67600c-52dd-463a-bbba-16d57d1cc0b6" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#fff;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt; &lt;li&gt;00000000002fdca0 000007feefda060f [DEFAULT] [hasThis] Object System.Delegate.DynamicInvokeImpl(SZArray Object) (C:&amp;#92;Windows&amp;#92;Microsoft.Net&amp;#92;assembly&amp;#92;GAC_64&amp;#92;mscorlib&amp;#92;v4.0_4.0.0.0__b77a5c561934e089&amp;#92;mscorlib.dll)&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;PARAMETERS:&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;  + (Error 0x80131304 retrieving parameter &amp;#39;this&amp;#39;)&lt;/li&gt; &lt;li&gt;  + (Error 0x80131304 retrieving parameter &amp;#39;args&amp;#39;)&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;LOCALS:&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;  + (Error 0x80004005 retrieving local variable &amp;#39;local_0&amp;#39;)&lt;/li&gt; &lt;li&gt;  + (Error 0x80004005 retrieving local variable &amp;#39;local_1&amp;#39;)&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;You are probably wondering where the actual values are. Just like !mk, when it’s JIT optimized code we can’t get the values. That doesn’t make !clrstack –i any less valuable because at least it shows you the types so you can use !dso, or !mdso from SOSEX, to look them up. To turn off the JIT optimizations, you’d have to either run the whole application with the &lt;a href="http://blogs.msdn.com/b/sburke/archive/2008/01/29/how-to-disable-optimizations-when-debugging-reference-source.aspx"&gt;COMPLUS_ZAPDISABLE&lt;/a&gt; environment variable or turn it off for an individual assembly with the &lt;a href="http://blogs.msdn.com/b/jaredpar/archive/2008/08/29/disabling-jit-optimizations-while-debugging.aspx"&gt;INI file trick&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The new –live and –dead options for !dumpheap and the –i for !clrstack are the most important additions, but there are a few more worth mentioning. The !bpmd command now supports setting breakpoints on a source and line if you have the PDB file for the assembly loaded. If you’re doing heavy interop, the new !dumprcw, which dumps a Runtime Callable Wrapper, and !dumpccw, which dumps a COM Callable Wrapper, look helpful. The new SOS for .NET 4.5 is nice, but wait until you see the new version of SOSEX!&lt;/p&gt;&lt;img src="http://www.wintellect.com/cs/aggbug.aspx?PostID=20648" width="1" height="1"&gt;</content><author><name>jrobbins</name><uri>http://www.wintellect.com/cs/members/jrobbins.aspx</uri></author><category term="Debugging" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Debugging/default.aspx" /></entry><entry><title>Cool Dev 11 Trick: Diff Random Files Easily</title><link rel="alternate" type="text/html" href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/03/07/cool-dev-11-trick-diff-random-files-easily.aspx" /><id>http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/03/07/cool-dev-11-trick-diff-random-files-easily.aspx</id><published>2012-03-08T01:56:39Z</published><updated>2012-03-08T01:56:39Z</updated><content type="html">&lt;p&gt;Dev 11 has a diff and merge view that is simply outstanding and using it to compare changes before checkin is just dreamy. I ran into a situation where I wanted to diff the output of two files and thought that it would be nice if I could do that in Dev 11. Popping into CTRL+Q and typing “diff” just says, “No search results available”, which isn’t very helpful.&lt;/p&gt;  &lt;p&gt;Figuring there had to be a command related to diffing, I looked up all the commands in the Keyboard Options page and ran into Tools.DiffFiles. Running that in the Command Windows did nothing so going for broke, I typed “Tools.DiffFiles c:\” and got a nice little autocomplete popup to choose the file. Obviously, Tools.DiffFiles takes two parameters, the first being the left side file, or the source, and the second being the right side file, or the target. Below shows an example from the Command Window&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:50be6ea0-0e48-4211-8043-ca7578e9ea47" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#fff;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt; &lt;li&gt;Tools.DiffFiles c:&amp;#92;test&amp;#92;a.txt c:&amp;#92;test&amp;#92;b.txt&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;That’s great we’ve got the ability to do random diffs inside the IDE, but being a command line guy, I want to do the diffs directly from PowerShell even if Dev 11 isn’t running. It turned out to be far easier than I ever imagined. Checking the command line options to DEVENV.EXE, by running “devenv /?” showed there’s a new command line switch. /diff, that does exactly what I wanted. So anytime you want to use the Dev 11 diff tool, run the following:&lt;/p&gt;  &lt;p&gt;   &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:23a30f47-8b82-48f2-bc07-7ab62f5486fe" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#fff;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt; &lt;li&gt;devenv /diff c:&amp;#92;foo&amp;#92;x.txt c:&amp;#92;bar&amp;#92;y.txt&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/p&gt;  &lt;p&gt;If Dev 11 is running, you’ll get a new diff window in the running instance, otherwise, you’ll get a new copy of the IDE. Of course, you’ll need devenv.exe in the path so run VCVARSALL.BAT to get it in your path.&lt;/p&gt;&lt;img src="http://www.wintellect.com/cs/aggbug.aspx?PostID=20645" width="1" height="1"&gt;</content><author><name>jrobbins</name><uri>http://www.wintellect.com/cs/members/jrobbins.aspx</uri></author><category term="Visual Studio" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Visual+Studio/default.aspx" /></entry><entry><title>Fixing Stuck/Hung Build in TFS Preview and Dev 11 Beta Build Server</title><link rel="alternate" type="text/html" href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/03/03/fixing-stuck-hung-build-in-tfs-preview-and-dev-11-beta-build-server.aspx" /><id>http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/03/03/fixing-stuck-hung-build-in-tfs-preview-and-dev-11-beta-build-server.aspx</id><published>2012-03-03T20:22:45Z</published><updated>2012-03-03T20:22:45Z</updated><content type="html">&lt;p&gt;Realizing I hadn’t updated my build server that ran against TFS Preview to the Beta Dev 11 TFS, I upgraded the machine and ran into a problem. The first queued build stuck and could not be canceled or deleted from the queue, thus blocking all builds. With an on premises TFS you can go into the SQL database and change the state of the build, but last I checked Microsoft won’t let us access our TFS Preview hosted SQL tables with SQL Management Studio.&lt;/p&gt;  &lt;p&gt;My scenario was a build controller running the Dev 11 Developer Preview TFS that was upgraded in place to the Dev 11 Beta TFS bits and kicking off builds from Visual Studio 2010. Since most of you will start with fresh Dev 11 Beta bits, I doubt anyone will run into the situation I had but will post the solution for karma points from the one other person who hits this.&lt;/p&gt;  &lt;p&gt;The upgrade itself went great and I was able to see the build servers from VS 2010. I checked in some changes that triggered a CI build and after 20 minutes saw that nothing had happened in the build. In Visual Studio 2010 I tried to cancel the build but no status changed. In the TFS Preview web site trying to cancel the build reported an error: “TFS.ServerException: TF215067: Cannot cancel queued build 48 on build controller BUILDSERVER - Controller. The current status is In Progress and queued builds can only be canceled if the status is either Postponed or Queued.” Shutting down Visual Studio, the build controller machine didn’t help either. Because of the stuck build, I couldn’t delete the build controller either.&lt;/p&gt;  &lt;p&gt;Firing up a new machine (named COMPILESERVER), I installed the Dev 11 Beta TFS and configured a new build server and said to replace an existing build server (named BUILDSERVER). That transferred the stuck build to COMPILESERVER. On BUILDSERVER, I unregistered the build server and removed the build server feature through the TFS Admin Console. Still on BUILDSERVER, I added back the build server feature and configured this to be a second build server against my TFS Preview hosted collection. &lt;/p&gt;  &lt;p&gt;Back in Visual Studio 2010, I queued up a new build against the updated BUILDSERVER and the stuck queued build immediately vanished. My new build worked fine and I was able to remove the build server from COMPILESERVER.&lt;/p&gt;&lt;img src="http://www.wintellect.com/cs/aggbug.aspx?PostID=20629" width="1" height="1"&gt;</content><author><name>jrobbins</name><uri>http://www.wintellect.com/cs/members/jrobbins.aspx</uri></author><category term="Bugs" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Bugs/default.aspx" /><category term="TFS" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/TFS/default.aspx" /></entry><entry><title>Initial Thoughts After Using the Dev 11 Beta for Two Weeks</title><link rel="alternate" type="text/html" href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/02/29/initial-thoughts-after-using-the-dev-11-beta-for-two-weeks.aspx" /><id>http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/02/29/initial-thoughts-after-using-the-dev-11-beta-for-two-weeks.aspx</id><published>2012-02-29T17:08:09Z</published><updated>2012-02-29T17:08:09Z</updated><content type="html">&lt;p&gt;So today is the day everyone gets to see if that monochrome/metro UI look for Visual Studio Dev 11 works. Given the huge number of “constructive criticism” &lt;a href="http://blogs.msdn.com/b/visualstudio/archive/2012/02/23/introducing-the-new-developer-experience.aspx#comments"&gt;comments&lt;/a&gt;&amp;#160; that everyone gave on the first look it will be very interesting to see what people think once they get their hands on it. Because of some work I am doing I’ve been using some of the beta builds full time for the last couple of weeks. In this post I want to give you some impressions and point you to a couple of key features that I’ve fallen in love with.&lt;/p&gt;  &lt;p&gt;In a nutshell, the overall new UI look is quite dull and I feel even stronger that color needs to be added back. One of the new UI changes I do very much love the blue highlight around the tool window that has focus. Now you know instantly which window where your typing will go and I wish that window focus hint could be back ported to Visual Studio 2010. While I’m getting better at what some of those black on grey icons do, I’m having to stop much more with the mouse hovering over the button to see what it does through the tool tip. I’d love to see how the methodology of the iconography study mentioned in the initial blog post because I haven’t talked to too many people who can recognize many of them at a glance.&lt;/p&gt;  &lt;p&gt;What bothers me most about the new UI kerfuffle is the marketing failure on how the changes were announced. There’s nothing wrong with moving my &lt;a href="http://en.wikipedia.org/wiki/Who_Moved_My_Cheese"&gt;cheese&lt;/a&gt;&amp;#160; if it’s going to make my life better. There are so many amazing changes for the better in Dev 11 that you will not only gladly have your cheese moved, you’ll happily change the flavor. I was frankly shocked that the first pieces of information about the Beta shown were static screen shots (with a ton of cheese moving for no apparent benefit) and emphasis on minor features. The second blog &lt;a href="http://blogs.msdn.com/b/visualstudio/archive/2012/02/24/introducing-the-new-developer-experience-part2.aspx"&gt;entry&lt;/a&gt; on the UI was better as it focused on usable features such as the Hub and Pivots, but those are still smaller features compared to everything else in the Dev 11 Beta.&lt;/p&gt;  &lt;p&gt;Marketing 101, and common sense, says to go out with the strongest best features first. By having the first look being something divisive and not showing off what’s amazing about the product, the poor impression lingers and hurts everything else being announced. Compounding this marketing misstep was Microsoft’s recent history of jerking around the development community a little over Windows 8 and massively with Silverlight. As developers who’ve bet our careers and companies on Microsoft we can’t afford many more marketing screw-ups like we’ve been seeing lately. Make no mistake they’ve built another great release of our every day tool. My main feature request for the release after Dev 11 is for marketing and management to shove everything else aside and have an actual plan that all changes must make the majority of users day to day work demonstrably easier and more productive. If it doesn’t meet those criteria, it’s cut immediately.&lt;/p&gt;  &lt;p&gt;I’m sorry for going off on the sidetrack about marketing, but I really do feel it is the weakest part of Dev 11. You came hear to read about the experience of using the new Beta. Since there’s going to be tons of information about these features from Microsoft today I won’t go into details about usage but want mention a few key features that have delighted me to no end as I’ve been using Dev 11 and ones you should concentrate on.&lt;/p&gt;  &lt;p&gt;One feature in particular needs a proper introduction: THE UNIT TESTING TOOLS IN DEV 11 ARE BEYOND H*@#Y S&amp;amp;#@T F@#&amp;amp;!!*G AWESOME! (I apologize for that outburst but I can’t help it.) While the tools have been pretty good for .NET development, albeit with some very sharp and painful edges, the new unit testing across all languages, including native C++, integrates seamlessly with your day-to-day work. I moved over a fairly large C++ project and was thrilled to see it’s trivial to implement tests and has the same integration as .NET. Everything is first class now and the Run Tests After Build is so obvious I don’t know how we lived without it!&lt;/p&gt;  &lt;p&gt;Moving over a large .NET project with existing unit tests using MSTEST was obviously trivial. What I’ve loved is that the team added support for other unit testing tools like xUnit. This means that say someone comes up with a unit testing tool for JavaScript or databases, it will be extremely easy to integrate. This is going to be a huge win for the future.&lt;/p&gt;  &lt;p&gt;With many of us using TFS as our ALM system it’s nice to see a lot of love given to the friction points in dealing with tasks, bugs, and version control. The new Team Explorer Pane is simply sublime. All the modal dialog hell that used to be TFS is all gone and many things now happen in the background like check in, search, and automatic updating of pending changes. It really is a radical rethink of the entire usage model for team development. At your fingertips you have everything you need to see what’s happening. My new favorite keystrokes all start with CTRL+0 (that’s zero) because to get to the pending changes in the Team Explorer Pane is CTRL+0, P, where the builds are CTRL+0,B and so on. &lt;/p&gt;  &lt;p&gt;Another feature related to TFS is the shift to local workspaces. In VS 2010, working with TFS was mostly OK if you were permanently connected to your TFS server. Trying to work offline from your TFS server was pretty painful as it was up to you to manage adding and removing files. Don’t get me started on the reliance on the read only flag for files or file changes from external tools weren’t picked up. Compared to the SVN experience, TFS wasn’t so great.&lt;/p&gt;  &lt;p&gt;That’s all changed as with local workspaces, there’s really no difference between online and offline mode. You work with your projects anywhere and any changes made by you in VS or a quick change to a file with Notepad2 are automatically seen and ready to go as soon as you connect back to your TFS server.&lt;/p&gt;  &lt;p&gt;What you’ll see different on your disk is a directory called $tfs under the root of the top workspace directory. That’s where TFS stores super compressed versions of the files and data. A background file watcher scans the differences between this cache and the file system to automatically pick up all pending changes including file updates, adds, and deletes. The VS 2010 way of finding updates was to pull up the Pending Changes dialog and look for all the changes by pounding on the server. Now the client does the work a tiny bit at the time so you have a real time view. It’s kind of hard to describe just how nice it is to just work with your projects and code with all changes ready to check in at a moments notice.&lt;/p&gt;  &lt;p&gt;As someone who loves all things debugging and profiling, the new IntelliTrace the new standalone collector is going to change your life. Being able to capture a “video” of your application in production instead of just a minidump is huge. It’s actually very easy to use and Microsoft has already posted a page that shows all the steps: &lt;a href="http://msdn.microsoft.com/en-us/library/hh398365(v=VS.110).aspx"&gt;http://msdn.microsoft.com/en-us/library/hh398365(v=VS.110).aspx&lt;/a&gt;. With rich PowerShell support just go ahead and make the stand-alone IntelliTrace collector part of your standard server install so it’s ready at a moments notice. You’ll want to set up training for your network administrators so they can start collecting the “videos” as soon as they see a problem.&lt;/p&gt;  &lt;p&gt;Let me make very clear that I do feel that Dev 11 is a hugely valuable release and something you’ll quickly fall in love with because of features that will make your life better. I know Microsoft has heard us regarding color so I suspect things will get brighter in the future, no pun intended. The real test of the value of Dev 11 is that I don’t like going back to Visual Studio 2010. &lt;/p&gt;&lt;img src="http://www.wintellect.com/cs/aggbug.aspx?PostID=20620" width="1" height="1"&gt;</content><author><name>jrobbins</name><uri>http://www.wintellect.com/cs/members/jrobbins.aspx</uri></author><category term="Reviews" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Reviews/default.aspx" /><category term="Visual Studio" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Visual+Studio/default.aspx" /></entry><entry><title>Going to the MVP Summit (or in Seattle)? We’d Love to Meetup!</title><link rel="alternate" type="text/html" href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/02/24/going-to-the-mvp-summit-or-in-seattle-we-d-love-to-meetup.aspx" /><id>http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/02/24/going-to-the-mvp-summit-or-in-seattle-we-d-love-to-meetup.aspx</id><published>2012-02-24T19:10:37Z</published><updated>2012-02-24T19:10:37Z</updated><content type="html">&lt;p&gt;So I guess February 29th ought to be quite interesting with Windows 8 Consumer Preview and VS 11 being released. An even more important date is Monday February 27th as that’s when we are holding a &lt;a href="http://bit.ly/Wintellect"&gt;Wintellect Tweetup&lt;/a&gt; where we want to hear your thoughts on all the new announcements. We’ll have fellow Wintellectuals, Jeremy Likness, Steve Porter, and Jeffrey Richter there to stir the debate. The event will be at Parlor Billiards and&amp;#160; Spirits in Bellevue. Hit the &lt;a href="http://bit.ly/Wintellect"&gt;link&lt;/a&gt; to sign up.&lt;/p&gt;  &lt;p&gt;Please note that this even&lt;strong&gt;&lt;em&gt;&lt;u&gt; IS NOT AT ALL&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt; limited to just MVPs! If you’re a Seattle-based developer you are more than invited as well. All NDAs (Non Disclosure Agreements) will be honored so we won’t be giving out any secrets so the Wintellect lawyers can breath a sigh of relief.&lt;/p&gt;  &lt;p&gt;We look forward to chatting with you and getting your opinion of everything Microsoft!&lt;/p&gt;&lt;img src="http://www.wintellect.com/cs/aggbug.aspx?PostID=20616" width="1" height="1"&gt;</content><author><name>jrobbins</name><uri>http://www.wintellect.com/cs/members/jrobbins.aspx</uri></author><category term="Wintellect" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Wintellect/default.aspx" /></entry><entry><title>Vote to Treat TFS as an Enterprise Symbol Server</title><link rel="alternate" type="text/html" href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/02/15/vote-to-treat-tfs-as-an-enterprise-symbol-server.aspx" /><id>http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/02/15/vote-to-treat-tfs-as-an-enterprise-symbol-server.aspx</id><published>2012-02-15T22:05:09Z</published><updated>2012-02-15T22:05:09Z</updated><content type="html">&lt;p&gt;&lt;a href="http://www.edsquared.com/default.aspx"&gt;Ed Blankenship&lt;/a&gt; has a brilliant idea to make symbol servers even easier to use. He wants TFS itself to serve up the symbols instead of requiring you to create the file share and fight with the network admins to get it backed up. Ed’s got a wonderful proposal on his &lt;a href="http://www.edsquared.com/2012/02/15/Feature+Request+Treat+TFS+As+An+Enterprise+Symbol+Server.aspx?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A+EdSquared+%28Ed+Squared%29"&gt;blog&lt;/a&gt; about how the feature would look and work. If you can’t tell, I love this idea! With IntelliTrace about to become such a major feature of your life, anything to make getting the right symbols easier needs to be high on Microsoft’s priority list.&lt;/p&gt;  &lt;p&gt;Go on over to UserVoice and &lt;a href="http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2564053-treat-tfs-as-an-enterprise-symbol-server"&gt;vote&lt;/a&gt; so Microsoft knows you want this! &lt;/p&gt;&lt;img src="http://www.wintellect.com/cs/aggbug.aspx?PostID=20601" width="1" height="1"&gt;</content><author><name>jrobbins</name><uri>http://www.wintellect.com/cs/members/jrobbins.aspx</uri></author><category term="Debugging" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Debugging/default.aspx" /></entry><entry><title>Debugger Canvas 1.1 is Released</title><link rel="alternate" type="text/html" href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/01/31/debugger-canvas-1-1-is-released.aspx" /><id>http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/01/31/debugger-canvas-1-1-is-released.aspx</id><published>2012-01-31T20:48:19Z</published><updated>2012-01-31T20:48:19Z</updated><content type="html">&lt;p&gt;There’s a lot of UI research going on focused around better debugging. Debugger Canvas is some that you can use today and the version 1.1 was just &lt;a href="http://msdn.microsoft.com/en-us/devlabs/debuggercanvas"&gt;released&lt;/a&gt;. The speed increased in 1.1 are great and make Debugger Canvas much more usable. I’m in love with the toggle button where you can flip between Debugger Canvas and regular text file display. While I have a few feature &lt;a href="http://www.wintellect.com/CS/blogs/jrobbins/archive/2011/06/14/debugger-canvas-tricks-and-wishes.aspx"&gt;requests&lt;/a&gt; that I’d love to see, using 1.1 made me wish for some more. My feedback’s been given to the Debugger Canvas team but I thought it might spark some discussion by mentioning my additional wishes to everyone:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;When using Debugger Canvas on a multithreaded application, I’d love to see the thread ID and/or name in the display when it’s an active call stack. It’s a little to easy to get lost in a multithreaded canvas.&lt;/li&gt;    &lt;li&gt;It would be nice to have a timestamp on a bubble. When one canvas is getting reused you can see at a glance which is the most recent chain.&lt;/li&gt;    &lt;li&gt;It would be nice to have a way to remove a whole chain at once.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Please do let the team know your feedback at the DevLabs Debugger Canvas &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/debuggercanvas/threads"&gt;forum&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.wintellect.com/cs/aggbug.aspx?PostID=20570" width="1" height="1"&gt;</content><author><name>jrobbins</name><uri>http://www.wintellect.com/cs/members/jrobbins.aspx</uri></author><category term="Debugging" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Debugging/default.aspx" /></entry><entry><title>Wintellect is Hiring!!</title><link rel="alternate" type="text/html" href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/01/24/wintellect-is-hiring.aspx" /><id>http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/01/24/wintellect-is-hiring.aspx</id><published>2012-01-24T06:33:18Z</published><updated>2012-01-24T06:33:18Z</updated><content type="html">&lt;p&gt;Business is good and we need YOU! Wintellect is currently seeking senior level technical development resources for both contract and permanent employment for our current client projects. If you want the challenge of keeping up with co-workers like Jeffrey Richter, Jeff Prosise, Keith Rome, or Jeremy Likness, have we got the opportunity of a lifetime. Please have lots of hands on development experience in the following technologies: C#, ASP.NET MVC, WPF, WCF, Silverlight and SQL Server. Experience with HTML5 and jQuery would be ideal also. If you can't tell, it's all cutting edge here at Wintellect so if you like doing the latest technology we'd love to talk with you. Please forward your resume and availability to Barbara Keihm, Director of Human Resources, &lt;a href="mailto:bkeihm@wintellect.com?subject=I%20want%20to%20work%20at%20Wintellect!"&gt;bkeihm@wintellect.com&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://www.wintellect.com/cs/aggbug.aspx?PostID=20551" width="1" height="1"&gt;</content><author><name>jrobbins</name><uri>http://www.wintellect.com/cs/members/jrobbins.aspx</uri></author><category term="Wintellect" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Wintellect/default.aspx" /></entry><entry><title>Paraffin 3.6–Now Keeping Custom Added Namespaces</title><link rel="alternate" type="text/html" href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/01/19/paraffin-3-6-now-keeping-custom-added-namespaces.aspx" /><id>http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/01/19/paraffin-3-6-now-keeping-custom-added-namespaces.aspx</id><published>2012-01-19T23:44:35Z</published><updated>2012-01-19T23:44:35Z</updated><content type="html">&lt;p&gt;Paraffin 3.6 can be downloaded here: &lt;a href="http://www.wintellect.com/CS/files/folders/18310/download.aspx"&gt;http://www.wintellect.com/CS/files/folders/18310/download.aspx&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Dan Gough had an excellent &lt;a href="http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Anybody-using-Paraffin-td7172929.html"&gt;feature request&lt;/a&gt; to have Paraffin copy over any manually added namespaces to the .WXS file like the following. Previously, Paraffin ignored them, but no more.&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:9357e3e1-452b-41dd-b7eb-88e813a23d8c" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#fff;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color:#a31515;"&gt;xml&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;version&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt;1.0&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;encoding&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt;utf-8&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt;?&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;Wix&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;xmlns:util&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt;http://schemas.microsoft.com/wix/UtilExtension&lt;/span&gt;&amp;quot;&lt;/li&gt; &lt;li&gt;     &lt;span style="color:#0000ff;"&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt;http://schemas.microsoft.com/wix/2006/wi&lt;/span&gt;&amp;quot;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;I updated Paraffin to copy over any namespaces added to the Wix element when creating the .PARAFFIN file. If you were having Paraffin inject additional elements with a .ParaffinMold file, now it’s easier than ever to keep your WiX fragments up to date.&lt;/p&gt;  &lt;p&gt;When adding custom namespaces, put them before the default xmlns=&amp;quot;http://schemas.microsoft.com/wix/2006/wi&amp;quot; as I’ve shown in the snippet above. With LINQ to XML, the xmlns attribute is special and does not show up in the Attributes collection so there’s no way I can sort it with the rest of the values. When generating the output XML file, XDocument always puts the xmlns attribute last. I tried all sorts of tricks to get it placed first but never got them to work. &lt;/p&gt;  &lt;p&gt;There’s no trouble if you place your custom namespaces after the default xmlns, but in the .PARAFFIN file they will always appear first so you’ll see more changes when you diff the .WXS and .PARAFFIN file.&lt;/p&gt;  &lt;p&gt;Please do let me know if you have feature requests! I considered adding a command line switch to allow adding custom namespaces when creating a .WXS fragment but didn’t think that would be used very much so decided against it. Of course, now that I’ve mentioned this option everyone’s going to ask for it. &amp;lt;grin!&amp;gt;&lt;/p&gt;  &lt;p&gt;If you’re not familiar with Paraffin, please read the Zen of Paraffin document in the root directory of the download.&lt;/p&gt;&lt;img src="http://www.wintellect.com/cs/aggbug.aspx?PostID=20541" width="1" height="1"&gt;</content><author><name>jrobbins</name><uri>http://www.wintellect.com/cs/members/jrobbins.aspx</uri></author><category term="Windows Installer" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Windows+Installer/default.aspx" /><category term="Wix" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Wix/default.aspx" /><category term="Paraffin" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Paraffin/default.aspx" /></entry><entry><title>Visual Studio 2010 Extensions Recommendations</title><link rel="alternate" type="text/html" href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/01/16/visual-studio-2010-extensions-recommendations.aspx" /><id>http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/01/16/visual-studio-2010-extensions-recommendations.aspx</id><published>2012-01-16T18:31:15Z</published><updated>2012-01-16T18:31:15Z</updated><content type="html">&lt;p&gt;The other day I was asked which extensions for Visual Studio I use so in an effort to &lt;a href="http://blog.jonudell.net/2007/04/10/too-busy-to-blog-count-your-keystrokes/"&gt;save keystrokes&lt;/a&gt;, I thought I’d list them here so I can refer people to this list. There’s no way this is a comprehensive list and I do add and remove extensions all the time. However, these are the ones that always stay installed because if they aren’t, I can’t use Visual Studio. By the way, these are all free.&lt;/p&gt;  &lt;h2&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef/"&gt;Productivity Power Tools&lt;/a&gt;&lt;/h2&gt;  &lt;p&gt;Want a bunch of features for the next version of Visual Studio today? That’s exactly what Microsoft’s Productivity Power Tools are all about. Once you use the awesome Solution Navigator, you’ll wonder how you ever lived without it. Add in the better Tab Well UI, Quick Find, and all the other enhancements and you’re in Visual Studio heaven. This is the single most important extension available. &lt;/p&gt;  &lt;h2&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/27077b70-9dad-4c64-adcf-c7cf6bc9970c"&gt;NuGet Package Manager&lt;/a&gt;&lt;/h2&gt;  &lt;p&gt;The first time you add an open source package to your solution, you’ll thank your lucky stars for this extension. It’s quick and easy so you can focus on what you need to do instead of the integration. What I find even better than the package manager is that NuGet adds a PowerShell window to Visual Studio. I’m using that constantly these days because the $dte variable exposes the Visual Studio automation model to PowerShell. &lt;/p&gt;  &lt;h2&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/f4d9c2b5-d6d7-4543-a7a5-2d7ebabc2496"&gt;VS Color Output&lt;/a&gt;&lt;/h2&gt;  &lt;p&gt;This fine extension adds color-coding to output windows in Visual Studio. Seeing build breaks in red and good builds in green, as well as control over all other output, is something that should have been built into Visual Studio already. The latest version 1.1 update fixes a crashing issue people were reporting.&lt;/p&gt;  &lt;h2&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/0db4814c-255e-4cc6-a2c2-a428de7f8949/"&gt;HTML Spell Checker&lt;/a&gt;&lt;/h2&gt;  &lt;p&gt;I can’t spell at all and this extension keeps me from looking like moron as others look at the comments in my code.&lt;/p&gt;  &lt;h2&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/4b92b6ad-f563-4705-8f7b-7f85ba3cc6bb"&gt;Highlight All Occurrences of a Selected Word&lt;/a&gt;&lt;/h2&gt;  &lt;p&gt;A super simple extension that does exactly what the title says. It’s wonderful when doing presentations to highlight a word and for looking at all uses of a global variable. Note that this extension offers no customizability so you’re stuck with the lime green highlight that does not work so well with you wild kids using dark background themes.&lt;/p&gt;  &lt;p&gt;So what extensions can you not live without? I’d love to know what extensions you use so either blog about them or add them to the comments.&lt;/p&gt;&lt;img src="http://www.wintellect.com/cs/aggbug.aspx?PostID=20532" width="1" height="1"&gt;</content><author><name>jrobbins</name><uri>http://www.wintellect.com/cs/members/jrobbins.aspx</uri></author><category term="Recommended" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Recommended/default.aspx" /></entry><entry><title>Setting the Power Plan with PowerShell</title><link rel="alternate" type="text/html" href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/01/15/setting-the-power-plan-with-powershell.aspx" /><id>http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/01/15/setting-the-power-plan-with-powershell.aspx</id><published>2012-01-15T07:54:00Z</published><updated>2012-01-15T07:54:00Z</updated><content type="html">&lt;p&gt;Edit: Make sure to read the comments from Shay Levy and Richard on clarifying my mistaken assumptions about how things work in PowerShell. Thanks to Richard &amp;amp; Shay for the clarifications!&amp;nbsp;&lt;/p&gt;&lt;p&gt;As I’m a command line kind of guy, I look for every opportunity to stay in a PowerShell window at all times. “Why grab the mouse when you don’t have?” to is my motto! The other day I was working on my laptop and was running short of battery power so wanted to switch to the Power Saver plan. A quick search told me POWERCFG.EXE was the command line tool to use.&lt;/p&gt;  &lt;p&gt;Hold on there Flash! POWERCFG.EXE with the –S option is the command line way to change power plans, but to specify the plan you must use the GUID of the plan. While I’m a big fan of GUIDs there’s several places where GUIDs are not appropriate: command line tools, URLs, and any other place where end users could see them. Shouldn’t you just be able to set the power plan by name like “Balanced, ” “Power Saver,” or if you are feeling randy, “High Performance?” That’s an oversight that needs to be fixed so below is a PowerShell script, Set-PowerPlan.ps1, that lets you set the power plan at the command line based on the name of the plan instead of an ugly GUID.&lt;/p&gt;  &lt;p&gt;The basic idea of the script is to get the list of defined power plans from “POWERCFG.EXE –l” and parse the output with a regular expression looking for the plan name with matching GUID. With the GUID in hand calling “POWERCFG –s &amp;lt;GUID&amp;gt;” flips to the defined plan. The regular expression work was simple, but there was one thing that stumped me.&lt;/p&gt;  &lt;p&gt;In all the PowerShell work I’ve done I’ve never needed to capture the output of an old-school command line program like POWERCFG.EXE. It seemed so simple to do something like “$plans = POWERCFG –l” to get the list of plans and parse the output with “$plans –match &amp;lt;some regex&amp;gt;” to pull out the GUID. Little did I know that would definitely not be anything approaching normal. Yet again a PowerShell-ism reached up and dope slap me hard.&lt;/p&gt;  &lt;p&gt;Interactively in a PowerShell console window, I ran “$plans = POWERCFG –l” and double-checked that $plans was a string by executing “$plans | Get-Member” as piping to Get-Member will report the type of object. Sure enough I was looking at a System.String. Oddly, when I ran “$plans –match &amp;lt;regex&amp;gt;” it always returned false even though typing “$plans” definitely showed me the complete output of the “POWERCFG –l” and the exact string I was looking for was there.&lt;/p&gt;  &lt;p&gt;What totally confused me was running “$plans.Length” as that reported “7” instead of the 364 characters I counted in the string. After a bunch of reading I finally realized that $plans is really a freaking ARRAY of seven lines instead of a complete string. When PowerShell captures the output of a regular command line program as an array of strings. Whenever one is first exposed to PowerShell you invariably are taught about the Get-Member command right at the beginning to figure out the type of an object. When Get-Member lies to you it’s hard to get a clue. It’s things like this that make you understand why so few developers have switched over to PowerShell. &lt;/p&gt;  &lt;p&gt;If you want all the output of a regular command line program into an actual string you have two choices. The first is to explicitly type the receiving variable with [string] like the following: “[string]$plans = powercfg -l” The alternative is to gather the regular command output into a variable, but if you need to look across all that output pipe the variable array to Out-String surrounded by parenthesis as in “($plans | Out-String)”.&lt;/p&gt;  &lt;p&gt;I’m sure some PowerShell Ninja will jump in here and tell me how I missed the obvious, but I don’t feel I did. Hopefully, this little PowerShell gotcha will help you go down the PowerShell route with more confidence. While PowerShell has some bumps along the way the journey is totally worth it!&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:6ed12321-49dd-4596-a424-ef426835a83c" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#000080;color:#fff;font-family:Verdana, Tahoma, Arial, sans-serif;font-weight:bold;padding:2px 5px;"&gt;Set-PowerPlan.PS1&lt;/div&gt; &lt;div style="background:#fff;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt; &lt;li&gt;#requires -version 2.0&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;# (c) 2012 by John Robbins\Wintellect&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;&amp;lt;#.SYNOPSIS&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;Sets the current power plan.&lt;/li&gt; &lt;li&gt;.DESCRIPTION&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;The POWERCFG.EXE utility requires GUIDS when changing a power plan instead of&lt;/li&gt; &lt;li&gt;the name of the plan. That's highly inconvenient so this simple script allows &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;you to use common sense names like "Balanced" or "Power Saver" instead.&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;To get the list of power plans on your computer execute 'powercfg -l'&lt;/li&gt; &lt;li&gt;.PARAMETER Plan&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;The name of the power plan to use.&lt;/li&gt; &lt;li&gt;.EXAMPLE &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;Set-PowerPlan -Plan Balanced&lt;/li&gt; &lt;li&gt;Sets the power plan to the Balanced plan, the recommnded Microsoft plan.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;.EXAMPLE &lt;/li&gt; &lt;li&gt;Set-PowerPlan "Power Saver"&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;Sets the power plan to the Power Saver plan to reduce battery usage.&lt;/li&gt; &lt;li&gt;.LINK&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;http://www.wintellect.com/CS/blogs/jrobbins/archive/tags/PowerShell/default.aspx&lt;/li&gt; &lt;li&gt;#&amp;gt;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;param ($Plan = $(throw 'You must specify the power plan, use "powercfg -l" for the plan names' ))&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;Set-StrictMode -Version Latest&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;# Get the list of plans on the current machine.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;$planList = powercfg.exe -l&lt;/li&gt; &lt;li&gt;&amp;nbsp;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;# The regular expression to pull out the GUID for the specified plan.&lt;/li&gt; &lt;li&gt;$planRegEx = "(?&amp;lt;PlanGUID&amp;gt;[A-Fa-f0-9]{8}-(?:[A-Fa-f0-9]{4}\-){3}[A-Fa-f0-9]{12})" + ("(?:\s+\({0}\))" -f $Plan)&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;# If the plan appears in the list...&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;if ( ($planList | Out-String) -match $planRegEx )&lt;/li&gt; &lt;li&gt;{&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;# Pull out the matching GUID and capture both stdout and stderr.&lt;/li&gt; &lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$result = powercfg -s $matches["PlanGUID"] 2&amp;gt;&amp;amp;1&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt; &lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;# If there were any problems, show the error.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if ( $LASTEXITCODE -ne 0)&lt;/li&gt; &lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$result&lt;/li&gt; &lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;}&lt;/li&gt; &lt;li&gt;else&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;{&lt;/li&gt; &lt;li&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Write-Error ("The requested power scheme '{0}' does not exist on this machine" -f $Plan) &lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;img src="http://www.wintellect.com/cs/aggbug.aspx?PostID=20524" width="1" height="1"&gt;</content><author><name>jrobbins</name><uri>http://www.wintellect.com/cs/members/jrobbins.aspx</uri></author><category term="PowerShell" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/PowerShell/default.aspx" /></entry><entry><title>Want Source Server to Work with Managed Minidumps in Visual Studio? Here’s How!</title><link rel="alternate" type="text/html" href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/01/06/want-source-server-to-work-with-managed-minidumps-in-visual-studio-here-s-how.aspx" /><id>http://www.wintellect.com/cs/blogs/jrobbins/archive/2012/01/06/want-source-server-to-work-with-managed-minidumps-in-visual-studio-here-s-how.aspx</id><published>2012-01-06T18:29:23Z</published><updated>2012-01-06T18:29:23Z</updated><content type="html">&lt;p&gt;So you have an awesome minidump your IT guys grabbed with &lt;a href="http://technet.microsoft.com/en-us/sysinternals/dd996900"&gt;ProcDump&lt;/a&gt;. You’ve followed all the rules and have a Symbol Server and Source Server all set up. You open that dump with Visual Studio and BOOM, none of your indexed sources show up. You pull your hair out trying to get your public build sources appear but they never do and it’s just “SRCSRV: The module ‘&amp;lt;&amp;lt;path to the exe file&amp;gt;&amp;gt;’ does not contain source server information.” for everything in the Output window.&lt;/p&gt;  &lt;p&gt;Fortunately, a smiling bald guy, &lt;a href="http://smilingbaldguy.wordpress.com/"&gt;Andy Hopper&lt;/a&gt;, figured out how to make it all &lt;a href="http://smilingbaldguy.wordpress.com/2012/01/06/managed-minidump-debugging-now-with-source-server-support/"&gt;work&lt;/a&gt;. Turns out when opening a minidump, the “managed debugging engine tries to verify that each source server enabled assembly is running as a fully trusted assembly from the CLR’s perspective.” Ahh, nothing like security to turn off a feature. The great news is that you can tell the managed debugging engine to stop doing the checks so the Source Server works with the managed minidumps. It’s as simple as setting a registry key. Swipe the registry script below and you are good to go.&lt;/p&gt;  &lt;p&gt;All credit to Andy Hopper on this one!&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:55b01d15-bc2c-439d-9916-2d0677300087" class="wlWriterEditableSmartContent"&gt; &lt;div style="border:#000080 1px solid;color:#000;font-family:'Courier New', Courier, Monospace;font-size:10pt;"&gt; &lt;div style="background:#fff;max-height:300px;overflow:auto;"&gt; &lt;ol style="background:#ffffff;margin:0;padding:0 0 0 5px;"&gt; &lt;li&gt;Windows Registry Editor Version 5.00&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;; Enables Source Server support when opening up managed minidumps in Visual Studio.&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;; All credit to Andy Hopper!&lt;/li&gt; &lt;li&gt;; http://smilingbaldguy.wordpress.com/2012/01/06/managed-minidump-debugging-now-with-source-server-support/&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;; If you&amp;#39;re on a 32-bit machine (and why would you be?) remove Wow6432Node.&lt;/li&gt; &lt;li&gt;;&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;[HKEY_LOCAL_MACHINE&amp;#92;SOFTWARE&amp;#92;Wow6432Node&amp;#92;Microsoft&amp;#92;VisualStudio&amp;#92;10.0&amp;#92;AD7Metrics&amp;#92;Engine&amp;#92;{00000000-0000-0000-0000-000000000000}]&lt;/li&gt; &lt;li style="background:#f3f3f3;"&gt;&amp;quot;RequireFullTrustForSourceServer&amp;quot;=dword:00000000&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;&lt;img src="http://www.wintellect.com/cs/aggbug.aspx?PostID=20499" width="1" height="1"&gt;</content><author><name>jrobbins</name><uri>http://www.wintellect.com/cs/members/jrobbins.aspx</uri></author><category term="Debugging" scheme="http://www.wintellect.com/cs/blogs/jrobbins/archive/tags/Debugging/default.aspx" /></entry></feed>
