<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Visual Studio</title>
        <link>http://www.rickgaribay.net/category/9.aspx</link>
        <description>Visual Studio</description>
        <language>en-US</language>
        <copyright>Rick G. Garibay</copyright>
        <managingEditor>rick@rickgaribay.net</managingEditor>
        <generator>Subtext Version 1.9.5.176</generator>
        <item>
            <title>Ctrl + Alt + E - The Way to Debug for Me</title>
            <link>http://rickgaribay.net/archive/2007/10/05/ctrl--alt--e---the-way-to-debug.aspx</link>
            <description>&lt;p&gt;&lt;font face="Arial"&gt;One of the best things I love about consulting is how much I learn from my clients.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;I have been in out in Salt Lake City for the last few weeks working on a WCF SOA project for a client and have been stepping through lots of code. And I'm not just talking about regular .NET code either- I'm talking two instances of Visual Studio 2005 up and running, one exercising a test harness/unit test and the other hosting a WCF service. I love the ability to step through a client, watch the call cross the process boundary and step into the service code. Visual Studio 2005 is truly a marvel of an IDE!&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;One of the things I learned from the lead .NET developer (Sam "Samwise" Walker)  this week is that VS 2005 supports the ability to control how the debugger interacts with exceptions. I have always debugged as follows:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;1. Step through the code&lt;br /&gt;
2. If an exception is thrown, the debugger chokes at the top-most level in the call chain&lt;br /&gt;
3. I then trace the exception back to the original site&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;This approach is ardous because by default the debugger will capture unhandled exceptions, but since exceptions bubble up to the top of the call stack, you are always left dealing with the outer exception.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;The solution is to set VS 2005 up to intercept exceptions as they are thrown, the first time an exception is thrown. This is contrary to the default behavior where the debugger will only catch the last unhandled exception as it winds it's way up the call stack.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;To enable this feature, in VS 2005, click Ctrl + Alt + E. An Exceptions window will appear. You will notice that for "Common Language Runtime Exceptions", the right-most column, "User Unhandled" is checked. This is the default behavior. Click the checkbox next to "Common Language Runtime Exceptions" labeled "Thrown". From this point forward, you will capture the very first exception as it is initially thrown.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;Hopefully, this tip will save you some time in your next debugging session.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Thanks Sam!&lt;/p&gt;&lt;img src="http://rickgaribay.net/aggbug/160.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rick G. Garibay - The more I learn, the less I kno</dc:creator>
            <guid>http://rickgaribay.net/archive/2007/10/05/ctrl--alt--e---the-way-to-debug.aspx</guid>
            <pubDate>Fri, 05 Oct 2007 20:22:22 GMT</pubDate>
            <wfw:comment>http://rickgaribay.net/comments/160.aspx</wfw:comment>
            <comments>http://rickgaribay.net/archive/2007/10/05/ctrl--alt--e---the-way-to-debug.aspx#feedback</comments>
            <wfw:commentRss>http://rickgaribay.net/comments/commentRss/160.aspx</wfw:commentRss>
            <trackback:ping>http://rickgaribay.net/services/trackbacks/160.aspx</trackback:ping>
        </item>
        <item>
            <title>MSBuild Reference Paths</title>
            <link>http://rickgaribay.net/archive/2007/08/25/msbuild-reference-paths.aspx</link>
            <description>&lt;p&gt;One of the nice things about MSBuild is that with Visual Studio 2005, the project and solution files &lt;strong&gt;&lt;em&gt;are &lt;/em&gt;&lt;/strong&gt;the build files. So, in theory, MSBUILD will start at the sln file and walk all references during a build process.&lt;/p&gt;
&lt;p&gt;But, what happens when you have an automated build process, or are doing continous integration and want to standardize project references to assemblies and other vendor components? Trying to get an entire development on board to use specific paths, etc is an option, but since no one is perfect (and enforcing these rules can be a nightmare), we need a better way to standardize the management of how dependancies are accessed.&lt;/p&gt;
&lt;p&gt;With a build process in place, the build can facilitate this standardization. Assemblies, both internal and from external vendors can be catalogued on a file share and the build process itself can reference this shared location in a standardized manner, without trying to micro-manage development environment settings.&lt;/p&gt;
&lt;p&gt;The solution is to use the ReferencePath property at the MSBUIILD command line.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;MSBUILD.EXE &amp;lt;solution name&amp;gt;  /p:"ReferencePath=&amp;lt;Path1;Path2;Path3&amp;gt;"&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;The &lt;font face="Courier New"&gt;ReferencePath&lt;/font&gt; property allows you to add a series of paths that MSBUILD will check, overriding any project-based references.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;This is extremely helpful when references are all over the place or when it is undesirable to recreate development-time configuration at build time.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://rickgaribay.net/aggbug/153.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rick G. Garibay - The more I learn, the less I kno</dc:creator>
            <guid>http://rickgaribay.net/archive/2007/08/25/msbuild-reference-paths.aspx</guid>
            <pubDate>Sat, 25 Aug 2007 22:50:22 GMT</pubDate>
            <wfw:comment>http://rickgaribay.net/comments/153.aspx</wfw:comment>
            <comments>http://rickgaribay.net/archive/2007/08/25/msbuild-reference-paths.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://rickgaribay.net/comments/commentRss/153.aspx</wfw:commentRss>
            <trackback:ping>http://rickgaribay.net/services/trackbacks/153.aspx</trackback:ping>
        </item>
        <item>
            <title>Visual Studio 2008</title>
            <link>http://rickgaribay.net/archive/2007/07/18/visual-studio-2008.aspx</link>
            <description>&lt;p&gt;Looks like the next version of Visual Studio, code named Orcas will ship in February along with .NET FX 3.5:&lt;/p&gt;
&lt;p&gt;"&lt;font face="Arial"&gt;The next version of Visual Studio, Microsoft Visual Studio 2008 (formerly known as Microsoft Visual Studio code name "Orcas"), will provide a developer experience for Windows Vista, the 2007 Microsoft Office system, and the Web. To enable early feedback, Microsoft provides Community Technology Preview (CTP) and Beta releases of Visual Studio 2008. Get an early look at Visual Studio 2008 Beta 1 and check back for the late-summer Beta 2 release."&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;-MSDN&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;What does this mean? For one, if you are working with .NET 3.0, you will now have a fully integrated development environment with full support for WCF, WPF and WF templates out of the box.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;It also brings the following "red bits" features back into the main product, including ASP.NET AJAX and the Web Application Project template.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;If you are doing WCF, a number of new serialization and messaging features will be added including:&lt;/font&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;font face="Arial"&gt;AJAX,&lt;/font&gt; &lt;/li&gt;
    &lt;li&gt;&lt;font face="Arial"&gt;JSON,&lt;/font&gt; &lt;/li&gt;
    &lt;li&gt;&lt;font face="Arial"&gt;REST&lt;/font&gt; &lt;/li&gt;
    &lt;li&gt;&lt;font face="Arial"&gt;POX&lt;/font&gt; &lt;/li&gt;
    &lt;li&gt;&lt;font face="Arial"&gt;RSS&lt;/font&gt; &lt;/li&gt;
    &lt;li&gt;&lt;font face="Arial"&gt;ATOM&lt;br /&gt;
    &lt;/font&gt;&lt;font face="Arial"&gt;&lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;font face="Arial"&gt;LINQ is also a big one which will change how we do DAL development. Unlike .NET 3.0, .NET 3.5 introduces a change to the C# compiler and a new CLR which will definetely make the development and deployment experience interesting...&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://rickgaribay.net/aggbug/148.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rick G. Garibay - The more I learn, the less I kno</dc:creator>
            <guid>http://rickgaribay.net/archive/2007/07/18/visual-studio-2008.aspx</guid>
            <pubDate>Thu, 19 Jul 2007 00:44:14 GMT</pubDate>
            <wfw:comment>http://rickgaribay.net/comments/148.aspx</wfw:comment>
            <comments>http://rickgaribay.net/archive/2007/07/18/visual-studio-2008.aspx#feedback</comments>
            <wfw:commentRss>http://rickgaribay.net/comments/commentRss/148.aspx</wfw:commentRss>
            <trackback:ping>http://rickgaribay.net/services/trackbacks/148.aspx</trackback:ping>
        </item>
        <item>
            <title>Making Configuration Files Available to NUnit</title>
            <link>http://rickgaribay.net/archive/2007/03/21/Making-Configuration-Files-Available-to-NUnit.aspx</link>
            <description>&lt;p&gt;NUnit can be run against any type of portable executable (PE), including DLLs and EXEs.&lt;/p&gt;
&lt;p&gt;Often, you will need the test that is calling a component to behave as if it itself were the actual call site, meaning that any configuration settings that will be in effect at deployment time should take effect during testing as well. For EXE based assemblies, this is a trivial issue- simply add an app.config to the test project in Visual Studio and away you go.&lt;/p&gt;
&lt;p&gt;When unit testing non-executable assemblies (DLLs), however, this isn't as straighforward because DLLs cannot execute without a host process. In this case, take the app.config you created and copy it into the bin directory in which the assembly you are testing is loaded. Rename the app.config to the full name of the assembly that NUnit will load.&lt;/p&gt;
&lt;p&gt;For example, for an assembly called "Ess.ServiceGateways.Epm.Interop.dll", you would rename the app.config to "Ess.ServiceGateways.Epm.Interop.dll.config".&lt;/p&gt;
&lt;p&gt;NUnit will probe for a configuration file with the same name of the assembly hosting the tests and load the configuration accordingly.&lt;/p&gt;&lt;img src="http://rickgaribay.net/aggbug/96.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rick G. Garibay</dc:creator>
            <guid>http://rickgaribay.net/archive/2007/03/21/Making-Configuration-Files-Available-to-NUnit.aspx</guid>
            <pubDate>Wed, 21 Mar 2007 21:07:43 GMT</pubDate>
            <wfw:comment>http://rickgaribay.net/comments/96.aspx</wfw:comment>
            <comments>http://rickgaribay.net/archive/2007/03/21/Making-Configuration-Files-Available-to-NUnit.aspx#feedback</comments>
            <wfw:commentRss>http://rickgaribay.net/comments/commentRss/96.aspx</wfw:commentRss>
            <trackback:ping>http://rickgaribay.net/services/trackbacks/96.aspx</trackback:ping>
        </item>
        <item>
            <title>When All Else Fails, Try MSIEXEC</title>
            <link>http://rickgaribay.net/archive/2007/02/17/When-All-Else-Fails-Try-MSIEXEC.aspx</link>
            <description>&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;If anyone has had the misfortune of installing the Whidbey (VS.NET 2005) bits along with .NET FX 2.0 or any of the Express betas, you may find that you cannot uninstall using 'Add Remove Programs'.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;In my case, I installed .NET FX 2.0 along with C# and Web Express side by side with VS.NET 2003, and when I tried to uninstall it, I found that I couldn't. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;This pales in comparison to other posts I've seen where installing the beta bits hosed current installs of VS.NET 2003, but more common is an issue when trying to install newer builds of Whidbey ontop of an existing build. Microsoft recommends uninstalling all old versions before installing a new version, but many, like me, found that uninstallation is not trivial.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;When trying to uninstall any of the above, I was getting error messages indicating that the action was prohibited by group policy. Since there are no GPO on my machine that care what gets uninstalled, this message is bogus. That said, the problem of getting rid of the installs remained.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;The solution:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;The solution comes down to two very useful utilities, &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/standard_installer_command_line_options.asp"&gt;msiexec&lt;/a&gt;&lt;/font&gt;&lt;font face="Verdana" color="#000000" size="2"&gt; and msiinv (sorry, you'll actually have to keep reading to find out how to get this). The former comes with the Microsoft Platform SDK, but the latter, unfortunately is only distributed on a case-by-case basis by Microsoft.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;Msiexec simply calls the uninstaller, passes it an MSI package name or a product code, which is a GUID that uniquely identifies the product. All products have this GUID, but as I found out, determining the GUID for each product is not trivial.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;Anyway, the syntax for msiexec is:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;Msiexec /x {GUID} | PackageName.msi&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;Note the pipe "|" above is used to specify OR.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;So, if I were to uninstall the Whidbey bits, per Sam Gentile's&lt;/font&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;&lt;a href="http://samgentile.com/blog/archive/2004/09/03/12187.aspx"&gt; blog&lt;/a&gt;, you would issue the following command:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New" color="#000000" size="2"&gt;msiexec.exe /x {B3A02601-8FE9-4108-8E95-D94171A2F8C8}&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;Why that works, but 'Add/Remove Programs' doesn't, or using the PackageName.msi option does not, I don't know. If anyone does, please let me know.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;BUT, what if you need to uninstall a product for which you do not know the GUID/Product Code? Enter msiinv.exe. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;As the name impiles, msiinv does an inventory of all msi packages on your machine, and reports them to a txt file of your choosing. So, to pipe the results from your machine, simply issue the following command and the command prompt:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New" color="#000000" size="2"&gt;Msiinv.exe &amp;gt; MyTextFile.txt&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;You now will have a GUID for every product on your machine, and you *should* be able to remove it.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;As I mentioned before, msiinv.exe is only distributed by Microsoft on a case by case basis, meaning that you actually have to open up an email dialogue with a Microsoft rep. Some very dedicated searching on the boards finally got me this little gem. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;To save you the time and effort, I am providing the link &lt;a href="http://www.huydao.net/setup/msiinv.zip"&gt;here&lt;/a&gt;, although I can't guarantee that it will always be available, nor do I make any guarantees that the file is safe although I did download it and have used it without issue. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;Note: My intention was to provide the utility for download, but after following up with a contact at Microsoft, I thought better.Why the hell don't you just host the file yourself you ask? Well, from my a moral gray area, I believe it is one thing to actually host the binaries and quite another to merely provide a shortcut to freely accessible information. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" size="2"&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;Happy Programming!&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana" color="#000000" size="2"&gt;** There is another utility called msizap that is supposed to perform a rudimentary removal if msiexec fails. Fortunately, I never had to use it.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://rickgaribay.net/aggbug/88.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rick G. Garibay</dc:creator>
            <guid>http://rickgaribay.net/archive/2007/02/17/When-All-Else-Fails-Try-MSIEXEC.aspx</guid>
            <pubDate>Sat, 17 Feb 2007 16:11:09 GMT</pubDate>
            <wfw:comment>http://rickgaribay.net/comments/88.aspx</wfw:comment>
            <comments>http://rickgaribay.net/archive/2007/02/17/When-All-Else-Fails-Try-MSIEXEC.aspx#feedback</comments>
            <wfw:commentRss>http://rickgaribay.net/comments/commentRss/88.aspx</wfw:commentRss>
            <trackback:ping>http://rickgaribay.net/services/trackbacks/88.aspx</trackback:ping>
        </item>
    </channel>
</rss>