<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://drowningintechnicaldebt.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>.NET Stuff - Thomas Waldron</title><link>http://drowningintechnicaldebt.com/blogs/thomaswaldron/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>New features in Quick Objects 3.x</title><link>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2008/03/10/command-line-interface-for-quick-objects-designer.aspx</link><pubDate>Mon, 10 Mar 2008 18:24:00 GMT</pubDate><guid isPermaLink="false">4fe7e88d-b128-4946-bef2-079055b364e8:580</guid><dc:creator>twaldron</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://drowningintechnicaldebt.com/blogs/thomaswaldron/rsscomments.aspx?PostID=580</wfw:commentRss><comments>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2008/03/10/command-line-interface-for-quick-objects-designer.aspx#comments</comments><description>&lt;p&gt;The latest version of&amp;nbsp;&lt;a class="" title="Quick Objects" href="http://www.akaltech.com/Products/Business_Logic/Details/Details.aspx"&gt;Quick Objects&lt;/a&gt;&amp;nbsp;includes introduces some nice features, increasing its appeal for both enterprise and small-shop development. The core framework now supports bulk delete and update operations, previously only possible by dropping down to stored procs or custom SQL. Below is an example of the BulkDelete functionality:&lt;/p&gt;
&lt;div&gt;&lt;pre&gt;&lt;font face="courier new,courier"&gt;&lt;font size="2"&gt;&lt;span class="lnum"&gt;   &lt;font color="#008080"&gt;1&lt;/font&gt;:  &lt;/span&gt;&lt;span class="kwrd"&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;/span&gt; (&lt;font color="#008080"&gt;AuditEntry&lt;/font&gt; entry = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;font color="#008080"&gt;AuditEntry&lt;/font&gt;())&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="courier new,courier"&gt;&lt;font size="2"&gt;&lt;span class="lnum"&gt;   &lt;font color="#008080"&gt;2&lt;/font&gt;:  &lt;/span&gt;{&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="courier new,courier"&gt;&lt;font size="2"&gt;&lt;span class="lnum"&gt;   &lt;font color="#008080"&gt;3&lt;/font&gt;:  &lt;/span&gt;    entry.ObjectMode = &lt;font color="#008080"&gt;ObjectModes&lt;/font&gt;.Search;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="courier new,courier"&gt;&lt;font size="2"&gt;&lt;span class="lnum"&gt;   &lt;font color="#008080"&gt;4&lt;/font&gt;:  &lt;/span&gt;    entry.LogDate.Visible = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="courier new,courier"&gt;&lt;font size="2"&gt;&lt;span class="lnum"&gt;   &lt;font color="#008080"&gt;5&lt;/font&gt;:  &lt;/span&gt;    entry.LogDate.Value = &lt;font color="#008080"&gt;DateTime&lt;/font&gt;.UtcNow.AddDays(-7);&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="courier new,courier"&gt;&lt;font size="2"&gt;&lt;span class="lnum"&gt;   &lt;font color="#008080"&gt;6&lt;/font&gt;:  &lt;/span&gt;    entry.LogDate.Operator = &lt;font color="#008080"&gt;Operators&lt;/font&gt;.LessThan;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="courier new,courier"&gt;&lt;font size="2"&gt;&lt;span class="lnum"&gt;   &lt;font color="#008080"&gt;7&lt;/font&gt;:  &lt;/span&gt;    entry.BulkDelete();&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="courier new,courier"&gt;&lt;font size="2"&gt;&lt;span class="lnum"&gt;   &lt;font color="#008080"&gt;8&lt;/font&gt;:  &lt;/span&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The object-generation tool has been enhanced to support command-line execution against a QO project file:&lt;br /&gt;&lt;font face="courier new,courier" size="2"&gt;&amp;quot;C:\Program Files\Akal Tech\Quick Objects V3\NET20\BIN\QuickObjects.Designer.exe&amp;quot; &amp;quot;C:\Projects\MyProject\QuickObjects.qos&amp;quot; /r /s /c /gb /gc /int /inc&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;In the above example, I am specifying that the objects refresh based on the latest database schema, and to include new tables and new columns. This can be especially handy&amp;nbsp;to run in&amp;nbsp;a post-deploy MSBuild target, if your solution includes a VSTS Database Edition project, in order to keep the business objects auto-synchronized with the database schema.&lt;/p&gt;
&lt;p&gt;Many developers out there host applications in shared hosting environments, which typically run&amp;nbsp;in Medium Trust. In previous version of QO, the licensing model required that the host make changes to their medium trust file to trust a 3rd-party licensing component, a task that might be difficult to get approved by a web host. QO has now updated its licensing model to support running in medium trust out of the box. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://drowningintechnicaldebt.com/aggbug.aspx?PostID=580" width="1" height="1"&gt;</description><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/.NET/default.aspx">.NET</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/QuickObjects/default.aspx">QuickObjects</category></item><item><title>VSTS 2008 DB Power Tools Released!</title><link>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2008/02/16/vsts-2008-db-power-tools-released.aspx</link><pubDate>Sat, 16 Feb 2008 16:54:00 GMT</pubDate><guid isPermaLink="false">4fe7e88d-b128-4946-bef2-079055b364e8:562</guid><dc:creator>twaldron</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://drowningintechnicaldebt.com/blogs/thomaswaldron/rsscomments.aspx?PostID=562</wfw:commentRss><comments>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2008/02/16/vsts-2008-db-power-tools-released.aspx#comments</comments><description>&lt;p&gt;The long-awaited &lt;a href="http://blogs.msdn.com/gertd/archive/2008/02/14/visual-studio-team-system-2008-database-edition-power-tools.aspx"&gt;power tools for VSTS 2008 DB edition have been released&lt;/a&gt;, which restore the sorely-missed functionality from the 2005 edition power tools, as well as some excellent improvements.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/gertd/archive/2008/02/14/visual-studio-team-system-2008-database-edition-power-tools.aspx"&gt;Features List&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=73ba5038-8e37-4c8e-812b-db14ede2c354&amp;amp;displaylang=en"&gt;Download&amp;nbsp;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;br /&gt;One of the coolest new features is the&lt;a href="http://blogs.msdn.com/gertd/archive/2008/02/14/data-generation-wizard.aspx"&gt; Data Generation Wizard&lt;/a&gt;, which lets you quickly build a data generation plan by pointing to an existing database.&lt;/p&gt;&lt;img src="http://drowningintechnicaldebt.com/aggbug.aspx?PostID=562" width="1" height="1"&gt;</description><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/.NET/default.aspx">.NET</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Visual+Studio+Team+System+-+Database/default.aspx">Visual Studio Team System - Database</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/vs2008/default.aspx">vs2008</category></item><item><title>Kick off a data generation plan programmtically</title><link>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2008/01/08/kick-off-a-data-generation-plan-programmtically.aspx</link><pubDate>Tue, 08 Jan 2008 16:57:00 GMT</pubDate><guid isPermaLink="false">4fe7e88d-b128-4946-bef2-079055b364e8:532</guid><dc:creator>twaldron</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://drowningintechnicaldebt.com/blogs/thomaswaldron/rsscomments.aspx?PostID=532</wfw:commentRss><comments>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2008/01/08/kick-off-a-data-generation-plan-programmtically.aspx#comments</comments><description>&lt;p&gt;In order to integrate VSTS 2008 Database Edition fully into your development lifecycle, one thing you will probably want to do is kick off a data generation plan automatically during certain activities. Luckily, this is built into some scenarios, like running unit tests--by specifying the &amp;quot;test data&amp;quot; configuration, you can optionally choose to have a database deployment and data generation plan execute prior to the tests starting. Sometimes, however, you just want to run a DG plan, and don&amp;#39;t want to have to open the file in VS, click the little button, select the database, and answer the &amp;quot;should I truncate the tables first?&amp;quot; question. One great way to get around this is to use a built-in MSBuild task that was provided to run data generation plans. You can incorporate it into a particular build configuration, or just write yourself a small standalone MSBuild project, along with a bat file to kick it off.&lt;/p&gt;&lt;p&gt;Here&amp;#39;s a quick sample, stolen and modified from &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=480861&amp;amp;SiteID=1"&gt;this post in the MSDN forums&lt;/a&gt;:&lt;/p&gt;&lt;p&gt;Filename:&amp;nbsp; RunDataGen.proj&lt;/p&gt;&lt;p&gt;&lt;font face="courier new,courier"&gt;&amp;lt;Project DefaultTargets=&amp;quot;DataGen&amp;quot; xmlns=&amp;quot;http://schemas.microsoft.com/developer/msbuild/2003&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;!--Import the settings--&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;Import Project=&amp;quot;C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\TeamData\Microsoft.VisualStudio.TeamSystem.Data.Tasks.targets&amp;quot; /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;lt;Target Name=&amp;quot;DataGen&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;Message Text=&amp;quot;$(MSBuildBinPath)&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DataGeneratorTask&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ConnectionString=&amp;quot;$(ConnectionString)&amp;quot;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; SourceFile=&amp;quot;$(SourceFile)&amp;quot;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; PurgeTablesBeforePopulate=&amp;quot;$(PurgeTablesBeforePopulate)&amp;quot;&lt;br /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; /&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/Target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/Project&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Filename:&amp;nbsp; RunDataGen.bat&lt;/p&gt;&lt;p&gt;&lt;font face="courier new,courier"&gt;C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe RunDataGen.proj /p:ConnectionString=&amp;quot;server=(local);database=MyDatabaseName.Deployed;Trusted_Connection=true&amp;quot;;SourceFile=&amp;quot;C:\Projects\MyProject\MyProject.Database\Data Generation Plans\LoadTablesForUnitTests.dgen&amp;quot;;PurgeTablesBeforePopulate=True&lt;/font&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://drowningintechnicaldebt.com/aggbug.aspx?PostID=532" width="1" height="1"&gt;</description><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Tips-n-Tricks/default.aspx">Tips-n-Tricks</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Visual+Studio+Team+System+-+Database/default.aspx">Visual Studio Team System - Database</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/vs2008/default.aspx">vs2008</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/msbuild/default.aspx">msbuild</category></item><item><title>Static Lookup Data Generators for Visual Studio Team System 2008 Database Edition</title><link>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2008/01/08/static-lookup-data-generators-for-visual-studio-team-system-2008-database-edition.aspx</link><pubDate>Tue, 08 Jan 2008 16:39:00 GMT</pubDate><guid isPermaLink="false">4fe7e88d-b128-4946-bef2-079055b364e8:529</guid><dc:creator>twaldron</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://drowningintechnicaldebt.com/blogs/thomaswaldron/rsscomments.aspx?PostID=529</wfw:commentRss><comments>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2008/01/08/static-lookup-data-generators-for-visual-studio-team-system-2008-database-edition.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;Updated:&amp;nbsp;Now that the &lt;a class="" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=73ba5038-8e37-4c8e-812b-db14ede2c354&amp;amp;displaylang=en"&gt;Power&amp;nbsp;Tools for VS2008 have been released&lt;/a&gt;, I recommend that you use the Sequential Databound Generator, &lt;a class="" href="http://blogs.msdn.com/gertd/archive/2008/02/16/file-bound-generator.aspx"&gt;FileBound Generator&lt;/a&gt;, and &lt;a class="" href="http://blogs.msdn.com/gertd/archive/2008/02/14/data-generation-wizard.aspx"&gt;Data Generation Wizard&lt;/a&gt; for these scenarios.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A &lt;a href="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/08/15/data-generation-with-static-lookup-tables-in-vsts-database-edition.aspx"&gt;while back&lt;/a&gt;, I put up a sample implementation of a custom data generator for VS 2005, to allow the generation of known static lookup values in a data generation plan. This was just something I was using to fill a gap until Microsoft released the Power Tools for VSTS 2005 DB Pro, which came with the Sequential Databound Generator, which was way more robust. When VS 2008 was released, the &lt;a href="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/11/26/sequential-data-bound-generator-missing-in-visual-studio-2008.aspx"&gt;Sequential Databound Generator was not included&lt;/a&gt;. It was intimated that this critical gap would be filled with an updated Power Tools for VSTS 2008 DB release soon, but until that day comes, I have been using an updated implementation of the original sample code, that will work with VS 2008. I&amp;#39;ve added static value generators to output the following .NET data types: &lt;font face="courier new,courier"&gt;bool, byte[], DateTime, int, string&lt;/font&gt;, as well as an installer.&lt;br /&gt;&lt;br /&gt;Usage instructions from the &lt;a href="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/08/15/data-generation-with-static-lookup-tables-in-vsts-database-edition.aspx"&gt;original post&lt;/a&gt; still apply.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://drowningintechnicaldebt.com/aggbug.aspx?PostID=529" width="1" height="1"&gt;</description><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/.NET/default.aspx">.NET</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Tips-n-Tricks/default.aspx">Tips-n-Tricks</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Visual+Studio+Team+System+-+Database/default.aspx">Visual Studio Team System - Database</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/vs2008/default.aspx">vs2008</category></item><item><title>How to install SQL Server 2005 Developer Edition after VS2008</title><link>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2008/01/07/how-to-install-sql-server-2005-developer-edition-after-vs2008.aspx</link><pubDate>Mon, 07 Jan 2008 18:01:00 GMT</pubDate><guid isPermaLink="false">4fe7e88d-b128-4946-bef2-079055b364e8:525</guid><dc:creator>twaldron</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://drowningintechnicaldebt.com/blogs/thomaswaldron/rsscomments.aspx?PostID=525</wfw:commentRss><comments>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2008/01/07/how-to-install-sql-server-2005-developer-edition-after-vs2008.aspx#comments</comments><description>&lt;p&gt;If you have already installed VS2008, and then try and install SQL Server 2005 Dev, you will probably get an error message about changing versions. If you proceed with the installation, the core database components will still be installed, but you won&amp;#39;t get the client tools. This is because VS2008 installs an instance of SQL Server Express called .\SQLEXPRESS (even if you tell it not to it would seem), as well as some form of the client tool components (but not what you need for managing multiple servers). Here is a link to a great blog post that explains how to extricate yourself from this situation:&lt;br /&gt;&lt;a href="http://tiredblogger.wordpress.com/2007/05/11/installing-sql-server-2005-tools-after-visual-studio-orcas/"&gt;http://tiredblogger.wordpress.com/2007/05/11/installing-sql-server-2005-tools-after-visual-studio-orcas/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;On Windows XP, I was able to get SQL Server 2005 Dev installed by following the instructions in the post to remove the pointless SQLEXPRESS instance, and then the client workstation components. This gets your machine back to the point where the Developer edition installer can run successfully.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://drowningintechnicaldebt.com/aggbug.aspx?PostID=525" width="1" height="1"&gt;</description><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/vs2008/default.aspx">vs2008</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/sqlserver/default.aspx">sqlserver</category></item><item><title>"Always Recreate Database" deploys by default in VS 2008</title><link>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/12/19/quot-always-recreate-database-quot-deploys-by-default-in-vs-2008.aspx</link><pubDate>Thu, 20 Dec 2007 06:25:00 GMT</pubDate><guid isPermaLink="false">4fe7e88d-b128-4946-bef2-079055b364e8:514</guid><dc:creator>twaldron</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://drowningintechnicaldebt.com/blogs/thomaswaldron/rsscomments.aspx?PostID=514</wfw:commentRss><comments>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/12/19/quot-always-recreate-database-quot-deploys-by-default-in-vs-2008.aspx#comments</comments><description>&lt;p&gt;I had gotten into the habit in VS 2005 DB Edition of enabling the &amp;quot;Always Re-Create Database&amp;quot; option in database project properties. This allowed me to ensure that the db was being re-created from scratch every time I deployed it. I would only deploy the database locally if I had made changes that I wanted to see, or maybe it would happen when running unit tests if so configured. &lt;/p&gt;
&lt;p&gt;I was feeling rather puzzled when VS 2008 kept auto-deploying my database project every time I entered the debugger. However, it turns out that this is due to VS 2008 having a different default value for a setting that prior to today, had never entered my reality: &amp;quot;Only build startup projects and dependencies on Run&amp;quot;. All you need to do is check this box, and you&amp;#39;re back to only deploying when you want to.&lt;/p&gt;
&lt;p&gt;&lt;img height="439" alt="Enable this setting to to stop auto-deploys when " src="http://drowningintechnicaldebt.com/blogs/thomaswaldron/AlwaysRecreateDatabaseDeploysByDefaultInVS2008/SettingToChangeForStoppingAutoDeploys.png" width="757" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://drowningintechnicaldebt.com/aggbug.aspx?PostID=514" width="1" height="1"&gt;</description><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/.NET/default.aspx">.NET</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Visual+Studio+Team+System+-+Database/default.aspx">Visual Studio Team System - Database</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/vs2008/default.aspx">vs2008</category></item><item><title>Changing default web browser in VS2008 </title><link>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/12/17/changing-default-web-browser-in-vs2008.aspx</link><pubDate>Mon, 17 Dec 2007 22:42:00 GMT</pubDate><guid isPermaLink="false">4fe7e88d-b128-4946-bef2-079055b364e8:510</guid><dc:creator>twaldron</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://drowningintechnicaldebt.com/blogs/thomaswaldron/rsscomments.aspx?PostID=510</wfw:commentRss><comments>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/12/17/changing-default-web-browser-in-vs2008.aspx#comments</comments><description>&lt;p&gt;After installing Visual Studio 2008, I noticed that the default web browser was set to Firefox. Although this is probably the correct behavior, Firefox&amp;nbsp;being my system default, I&amp;#39;m pretty sure that prior versions of VS ignored my OS-level selection and made IE the initial default. To select a different browser, open an ASPX page, and select “&lt;strong&gt;File&lt;/strong&gt;”&amp;nbsp;-&amp;gt; “&lt;strong&gt;Browse With&lt;/strong&gt;”, or right-click an ASPX resource in Solution Explorer, and choose “&lt;strong&gt;Browse With&lt;/strong&gt;”. This will open&amp;nbsp;a dialog where you can&amp;nbsp;choose a different browser, and optionally make it the default.&amp;nbsp;&lt;/p&gt;&lt;img src="http://drowningintechnicaldebt.com/aggbug.aspx?PostID=510" width="1" height="1"&gt;</description><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/.NET/default.aspx">.NET</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/vs2008/default.aspx">vs2008</category></item><item><title>Sequential Data Bound Generator Missing in Visual Studio 2008</title><link>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/11/26/sequential-data-bound-generator-missing-in-visual-studio-2008.aspx</link><pubDate>Tue, 27 Nov 2007 04:41:00 GMT</pubDate><guid isPermaLink="false">4fe7e88d-b128-4946-bef2-079055b364e8:494</guid><dc:creator>twaldron</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://drowningintechnicaldebt.com/blogs/thomaswaldron/rsscomments.aspx?PostID=494</wfw:commentRss><comments>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/11/26/sequential-data-bound-generator-missing-in-visual-studio-2008.aspx#comments</comments><description>&lt;p&gt;A while back, Microsoft gave us the excellent &lt;a class="" title="Power Tools" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=DA3F11AD-BD54-4EDA-B08C-4DF84DF0D641&amp;amp;displaylang=en"&gt;Power Tools&lt;/a&gt; release for the database edition of VSTS 2005. One of the best things about this release was the &lt;em&gt;Sequential Data Bound Generator&lt;/em&gt;, which allows the generation of specific values for lookup tables. This generator filled a crucial gap&amp;nbsp;for&amp;nbsp;teams wishing to incorporate&amp;nbsp;data generation plans in the development cycle--a use case that is so common, it&amp;#39;s almost unbelievable that it was not included in the initial release. Once I downloaded the power tools, I quickly migrated my old data generation plans from &lt;a class="" title="using a custom generator" href="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/08/15/data-generation-with-static-lookup-tables-in-vsts-database-edition.aspx"&gt;using a custom generator&lt;/a&gt; that performed the same basic function&amp;nbsp;to the superior Sequential Data Bound Generator bundled with the released. After installing Visual Studio Team System 2008&amp;nbsp;Team Suite, I found that a mind-boggling choice was made not to include this generator with the release (or other features of the Power Tools), even though the enhancements from &lt;a class="" title="Microsoft® Visual Studio® 2005 Team Edition for Database Professionals Service Release 1" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9810808c-9248-41a5-bdc1-d8210a06ed87&amp;amp;displaylang=en"&gt;SR1&lt;/a&gt; are bundled with VS2008. This is &lt;a class="" title="Sequential Data Bound Generator Not Included in VS2008" href="http://blogs.msdn.com/gertd/archive/2007/11/21/visual-studio-team-system-2008-database-edition.aspx"&gt;confirmed in a post on the team&amp;#39;s blog&lt;/a&gt;: &amp;quot;&lt;em&gt;The Visual Studio Team System 2008 Database Edition is based on the v1.0 functionality &lt;u&gt;plus the Service Release 1 functionality&lt;/u&gt;; &lt;/em&gt;&amp;quot;...&amp;quot;&lt;em&gt;The functionality that was made available through Power Tools for 2005, remains inside the Power Tools for the 2008 &lt;/em&gt;&lt;strong&gt;[sic] &lt;/strong&gt;&lt;em&gt;release, we are trying to release a new Power Tools release targeting 2008 later this month.&lt;/em&gt;&amp;quot; Based on this, there may be a couple of hurdles to go through, depending on how your shop chooses to migrate. Hopefully the 2008-targeted Power Tools will be released sooner rather than later.&lt;/p&gt;&lt;img src="http://drowningintechnicaldebt.com/aggbug.aspx?PostID=494" width="1" height="1"&gt;</description><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/.NET/default.aspx">.NET</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Visual+Studio+Team+System+-+Database/default.aspx">Visual Studio Team System - Database</category></item><item><title>Data Generation with Static Lookup Tables in VSTS Database Edition</title><link>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/08/15/data-generation-with-static-lookup-tables-in-vsts-database-edition.aspx</link><pubDate>Wed, 15 Aug 2007 18:53:00 GMT</pubDate><guid isPermaLink="false">4fe7e88d-b128-4946-bef2-079055b364e8:437</guid><dc:creator>twaldron</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://drowningintechnicaldebt.com/blogs/thomaswaldron/rsscomments.aspx?PostID=437</wfw:commentRss><comments>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/08/15/data-generation-with-static-lookup-tables-in-vsts-database-edition.aspx#comments</comments><description>&lt;ul&gt;
&lt;li&gt;&lt;a class="" title="Custom Generator source code and related files" href="http://drowningintechnicaldebt.com/blogs/thomaswaldron/CustomDataGenerator/CustomGenerators.zip"&gt;Download source files for this&amp;nbsp;post&lt;/a&gt; - includes some extra files for supporting techniques in this article &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Recently, I&amp;#39;ve been working a lot with VSTS DB Edition, in the hopes of fully-integrating database projects in my day-to-day development and unit-testing activities. As a whole, VSTS DB is an incredible tool, with a lot of promise. However, there are a few highly-noticeable gaps in this version&amp;nbsp;1.0 product, that make it slightly challenging to use. One critical missing feature is the ability to use data generation with a table intended to contain specific static lookup values. I found that the following use case was not possible using the out-of-the-box data generators:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Build and deploy the database locally from scratch&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Load all lookup tables with static values&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Load all other tables with randomly-generated data&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Run all unit tests, which exercise code that ultimately expects certain values to be in lookup tables (e.g. an enumeration may map to values in a lookup table.)&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The solution to this was to build a custom data generator, to handle static lookup values. To demonstrate this, I&amp;#39;ll use a simple database schema with four tables:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;User, Product, Category — all considered non-lookup tables (I&amp;#39;m including the Category table in this list, as this will be populated with dynamic information through normal operation of the app, and no code will be written that expects certain values to be in it).&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;UserType — a lookup table that&amp;nbsp;must be pre-loaded with specific static values for the app to work properly.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;img title="Database layout" style="WIDTH:794px;HEIGHT:700px;" height="700" alt="Database layout" src="http://drowningintechnicaldebt.com/blogs/thomaswaldron/CustomDataGenerator/01.jpg" width="794" /&gt;&lt;/p&gt;
&lt;p&gt;To get setup, I import the database schema shown above into a SQL Server 2005 database project inside Visual Studio. I then&amp;nbsp;set the following project properties, under the Build tab:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;&lt;b&gt;Target database name&lt;/b&gt;: VstsTdd.Database.Deployed&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;b&gt;Always re-create database&lt;/b&gt;: Enabled&amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;These settings ensure that I can re-build the entire database from scratch using only the SQL Server 2005 project, and that when deploying a local copy of the target database, it will&amp;nbsp;always have&amp;nbsp;a consistent&amp;nbsp;name. I will be using this database as the target, when I run unit tests later.&lt;/p&gt;
&lt;p&gt;&lt;font face="georgia,palatino" size="3"&gt;Data Generation out of the Box&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Data Generation Plans are an excellent feature in VSTS DB, that allow you quickly fill tables up with random data. This is accomplished using several built-in data generators, that can load columns with various numeric types or strings, and can even make use of regular expressions. Also, the developers who created the generators solved many gotchas that immediately spring to mind, by gracefully accommodating foreign key and unique constraints, nullable columns, and identity columns. So the first thing to do, is create a new data generation plan, select all non-lookup tables, and configure data generation for each column.&lt;/p&gt;
&lt;p&gt;The screenshot below shows a data generation plan against this particular database schema. Demonstrated here are two things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;The plan correctly determined that the User.Username column has a Unique constraint, and will generate data accordingly.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;It is impossible to completely disable data generation for the UserType table, due to the foreign key constraint from User. Because of this constraint, the data generation engine will fill the UserType table with random values, even though it has not been marked explicitly for generation.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;img title="Data Generation Plan" style="WIDTH:1029px;HEIGHT:588px;" height="588" alt="Data Generation Plan" src="http://drowningintechnicaldebt.com/blogs/thomaswaldron/CustomDataGenerator/02.jpg" width="1029" /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="georgia,palatino" size="3"&gt;Workarounds that don&amp;#39;t Work so Well&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;There are a couple of workarounds available using the tools at hand. One of these is to pre-load the lookup tables with the desired values using&amp;nbsp;one of the database projects scripts, such as the post-deploy script. Simply add insert statements to a post-deploy script, right-click the project, and select &amp;quot;Deploy&amp;quot;. Now the database has been recreated, and pre-populated with lookup values.&lt;/p&gt;
&lt;p&gt;&lt;img title="Adding insert statements to post-deployment script" style="WIDTH:625px;HEIGHT:490px;" height="490" alt="Adding insert statements to post-deployment script" src="http://drowningintechnicaldebt.com/blogs/thomaswaldron/CustomDataGenerator/03.jpg" width="625" /&gt;&lt;/p&gt;
&lt;p&gt;The problem with this approach is that when you run data generation against the UserType table, there is no way to keep just those values in the table.&amp;nbsp;If we look at the different options, none of them quite does the job:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Set the &amp;quot;Rows to Insert&amp;quot; property for UserType to 0, since it has already been pre-loaded with static values. In this case, data generation will fail for the User table, because the data generation engine is not intelligent enough to recognize the existing rows in UserType. Thus, it tries to insert null for User.UserType, and fails.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Leave the default&amp;nbsp;Integer generator for UserType.Id and String generator for UserType.Description, and change &amp;quot;Rows to Insert&amp;quot; to a positive integer. This time, when running data generation, every value stored in User.UserType will correspond with one of the generated values — it will never select one of the pre-created values.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The next approach is look at using&amp;nbsp;the supplied Data Bound Generator. With this generator, you can populate a column based on a connection string and select statement, by pointing it to some other table where your lookup values are stored. The problem is...how do you make it choose each row in that target table exactly one time? One thing you can do is change the &amp;quot;seed&amp;quot;&amp;nbsp;property value, to affect which row the random generator chooses each time — if you painstakingly try every possible value (start at 1, then try 2, then 3, ...) you may be able to get it to choose each lookup value exactly one time. However, this only works with small lookup tables—I&amp;#39;m not sure of the magic threshold, but let&amp;#39;s say something like 10 rows.&amp;nbsp;I have tried working around this in myriad ways. For pre-loading, I tried using global and local temp tables, as well as a separate database, pre-populated with scripts. For selection, I tried selecting directly from a table, as well as running through UDFs and stored procedures, moving values in and out of different temp tables, to try and select each value only one time. At the end of the day, all of these methods failed me—it was a battle against the IDE, and the IDE won, often crashing in the process when entering anything non-standard as the select statement value for the data bound generator.&lt;/p&gt;
&lt;p&gt;&lt;font face="georgia,palatino" size="3"&gt;Custom Data Generation&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;To solve the issues with lookup tables, I built a custom data generator, for providing strings that map to lookup values (you could modify this to generate numeric types as well). The values are generated in the right order by specifying a select statement in the designer to pull them out ordered by the pre-inserted IDs (more on this later). You can &lt;a class="" title="Custom data generator source and binary" href="http://drowningintechnicaldebt.com/blogs/thomaswaldron/CustomDataGenerator/CustomGenerators.zip"&gt;download the source code, and binary here&lt;/a&gt;. There&amp;#39;s not too much to creating one of these:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Inherit from &lt;font size="2"&gt;Microsoft.VisualStudio.TeamSystem.Data.DataGenerator.Generator&lt;/font&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;If you intend to generate unique values (probably so), mark the class with [GeneratorStyles(DesignerStyles=GeneratorDesignerStyles.CanProduceUniqueValues)]&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Mark one property with [Microsoft.VisualStudio.TeamSystem.Data.DataGenerator.Output]. This is where the unique values are sent for the data generation engine to pick up.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Add other properties as needed for input through the designer, marking these with the corresponding [Input] attribute. In my case, I added a SelectStatement and ConnectionString property to direct the generator to the right table source.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Override the OnInitialize method to retrieve the lookup values. In my case, I stored these to a field-level Queue.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Override the OnGenerateNextValue method to set the output property with the next value.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;After building the custom generator, it needs to be installed. This is a bit of a pain, but here are the steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Sign the assembly with a strong name. Create an extensions XML file that references the fully-qualifed assembly name (I have included the sn keypair and xml file that I used in the download)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Copy the assembly to:&lt;/div&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;the PrivateAssemblies directory, default location = &amp;quot;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\&amp;quot;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Sometimes I have added it to the Extensions directory for good measure, not sure if this matters, default location = &amp;quot;C:\Program Files\Microsoft Visual Studio 8\DBPro\Extensions\&amp;quot;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;li&gt;
&lt;div&gt;Copy the CustomGenerators.Extensions.xml file to the DBPro directory, default location = &amp;quot;C:\Program Files\Microsoft Visual Studio 8\DBPro\&amp;quot;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Another option is registering the assembly in the GAC.&lt;/p&gt;
&lt;p&gt;You will know the custom generator is installed correctly when it shows up in the list of available generators for character data columns.&lt;/p&gt;
&lt;p&gt;&lt;img title="StaticLookupValue generator is installed" style="WIDTH:649px;HEIGHT:473px;" height="473" alt="StaticLookupValue generator is installed" src="http://drowningintechnicaldebt.com/blogs/thomaswaldron/CustomDataGenerator/04.jpg" width="649" /&gt;&lt;/p&gt;
&lt;p&gt;Now, for it to actually work, we need to put all of the lookup values into a safe place, where we can pull them back out at data generation time. I favor storing these values in a separate database, in normal tables. I use scripting to pre-create this &amp;quot;support database&amp;quot;, along with all tables and lookup data. So going back to the LoadStaticValues.sql script that is being run in the post-deployment, phase, it can be edited to perform these functions as shown below. This script is available in the download.&lt;/p&gt;
&lt;p&gt;&lt;img title="Post-deployment script creates support database with lookup tables and values" style="WIDTH:805px;HEIGHT:783px;" height="783" alt="Post-deployment script creates support database with lookup tables and values" src="http://drowningintechnicaldebt.com/blogs/thomaswaldron/CustomDataGenerator/05.jpg" width="805" /&gt;&lt;/p&gt;
&lt;p&gt;Finally, we are almost done. Going back to the data generation plan, we can set the generator for UserType.Description to a StaticLookupValue generator, with the following property settings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;&lt;b&gt;Unique&lt;/b&gt;: True&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;b&gt;ConnectionString&lt;/b&gt;: server=(local);database=VstsTdd.Database.Support;Trusted_Connection=true;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;b&gt;SelectStatement&lt;/b&gt;: SELECT [Description] FROM UserType ORDER BY [Id] ASC&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Note the ordering clause on the SelectStatement property is being utilized to generate the values in the same order that they were inserted into the support database. Note also that the data preview will fail in the designer until the support database exists, meaning you have to deploy it first to get a working preview. Finally, be sure and set the &amp;quot;Rows to Insert&amp;quot; on the UserType table to the exact number of lookup values in the table (in our case, 3). Otherwise, it will run out of values (in the StaticLookupValue generator class, I handled this to degrade somewhat gracefully by having it output &lt;font face="courier new,courier"&gt;RanOutOfValues-&lt;i&gt;{ordinal}&lt;/i&gt;&lt;/font&gt; once all values have been exhausted).&lt;/p&gt;
&lt;p&gt;Run the data generation plan:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Click the &amp;quot;Generate Data&amp;quot; button&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Select the deployed database connection string for the target (not the support database). In this case, the connection string is: &lt;font face="courier new,courier"&gt;server=(local);database=VstsTdd.Database.Deployed;Trusted_connection=true;&lt;/font&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;font face="arial,helvetica,sans-serif"&gt;When asked if you want to clear all rows in selected tables, answer &amp;quot;Yes&amp;quot;. This is because all necessary values will now be handled by the data generation plan.&lt;/font&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;When complete, each table should show a successful status, and selecting from the table will bring back the exact lookup values previously specified, in the right order.&lt;/p&gt;
&lt;p&gt;&lt;img title="Successful data generation with lookup tables and static data" style="WIDTH:849px;HEIGHT:174px;" height="174" alt="Successful data generation with lookup tables and static data" src="http://drowningintechnicaldebt.com/blogs/thomaswaldron/CustomDataGenerator/06.jpg" width="849" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="georgia,palatino" size="3"&gt;Next Steps&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Now that data generation is working properly with lookup tables, the next logical step is to have this particular data generation plan run automatically when you start a unit test project. Using the database unit test features that come with VSTS Database Edition, one is able to configure a unit test project to do exactly that, thereby assuring that the database has been reset to pre-defined known state, prior to running the first unit test.&lt;/p&gt;
&lt;p&gt;&lt;img title="Run data generation plan prior to unit tests" style="WIDTH:513px;HEIGHT:635px;" height="635" alt="Run data generation plan prior to unit tests" src="http://drowningintechnicaldebt.com/blogs/thomaswaldron/CustomDataGenerator/07.jpg" width="513" /&gt;&lt;/p&gt;&lt;img src="http://drowningintechnicaldebt.com/aggbug.aspx?PostID=437" width="1" height="1"&gt;</description><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/.NET/default.aspx">.NET</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Tips-n-Tricks/default.aspx">Tips-n-Tricks</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Visual+Studio+Team+System+-+Database/default.aspx">Visual Studio Team System - Database</category></item><item><title>Visual Studio - Always Show Solution</title><link>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/08/15/visual-studio-always-show-solution.aspx</link><pubDate>Wed, 15 Aug 2007 18:10:00 GMT</pubDate><guid isPermaLink="false">4fe7e88d-b128-4946-bef2-079055b364e8:436</guid><dc:creator>twaldron</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://drowningintechnicaldebt.com/blogs/thomaswaldron/rsscomments.aspx?PostID=436</wfw:commentRss><comments>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/08/15/visual-studio-always-show-solution.aspx#comments</comments><description>&lt;p&gt;In Visual Studio 2005, if you have a solution open, with only one project attached to it, the solution file is not visible in the Solution Explorer window. This can be slightly annoying, since right-clicking the solution file from this window is a quick way to add another project (the alternative being to add one from the File menu). I&amp;#39;m not sure why it took me almost two years to notice this, but there is a setting under &amp;quot;Projects and Solutions&amp;quot; to &amp;quot;Always Show Solution&amp;quot;. Enabling this, changes the behavior.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Before...&lt;br /&gt;&lt;/strong&gt;&lt;img title="Solution file not visible" style="WIDTH:403px;HEIGHT:404px;" height="404" alt="Solution file not visible" src="http://drowningintechnicaldebt.com/blogs/thomaswaldron/SolutionVisible/SolutionVisible01.jpg" width="403" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Change the Setting&lt;br /&gt;&lt;img title="Always Show Solution" style="WIDTH:757px;HEIGHT:438px;" height="438" alt="Always Show Solution" src="http://drowningintechnicaldebt.com/blogs/thomaswaldron/SolutionVisible/SolutionVisible02.jpg" width="757" /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;After...&lt;/strong&gt;&lt;br /&gt;&lt;img title="Solution file visible" style="WIDTH:213px;HEIGHT:171px;" height="171" alt="Solution file visible" src="http://drowningintechnicaldebt.com/blogs/thomaswaldron/SolutionVisible/SolutionVisible03.jpg" width="213" /&gt;&lt;/p&gt;&lt;img src="http://drowningintechnicaldebt.com/aggbug.aspx?PostID=436" width="1" height="1"&gt;</description><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/.NET/default.aspx">.NET</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Tips-n-Tricks/default.aspx">Tips-n-Tricks</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Visual+Studio/default.aspx">Visual Studio</category></item><item><title>Determining the framework version under which an assembly was compiled</title><link>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/07/30/determining-the-framework-version-under-which-an-assembly-was-compiled.aspx</link><pubDate>Mon, 30 Jul 2007 17:44:00 GMT</pubDate><guid isPermaLink="false">4fe7e88d-b128-4946-bef2-079055b364e8:428</guid><dc:creator>twaldron</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://drowningintechnicaldebt.com/blogs/thomaswaldron/rsscomments.aspx?PostID=428</wfw:commentRss><comments>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/07/30/determining-the-framework-version-under-which-an-assembly-was-compiled.aspx#comments</comments><description>Here is a quick and easy way to determine the version of the framework, under which an assembly was compiled (code written using &lt;a href="http://www.sliver.com/dotnet/SnippetCompiler/"&gt;SnippetCompiler&lt;/a&gt;):
&lt;pre&gt;&lt;font face="courier new,courier" size="2"&gt;&lt;font color="#3300ff"&gt;using&lt;/font&gt; System;&lt;br /&gt;&lt;font color="#3300ff"&gt;using&lt;/font&gt; System.Collections.Generic;&lt;br /&gt;&lt;font color="#3300ff"&gt;using&lt;/font&gt; System.Reflection;&lt;br /&gt;&lt;br /&gt;&lt;font color="#3300ff"&gt;public class&lt;/font&gt; MyClass&lt;br /&gt;{&lt;br /&gt;	&lt;font color="#3300ff"&gt;public static void&lt;/font&gt; Main()&lt;br /&gt;	{&lt;br /&gt;		Assembly a = Assembly.LoadFile(@&amp;quot;&lt;font color="#330099"&gt;C:\PathToFile\AssemblyFile.dll&lt;/font&gt;&amp;quot;);&lt;br /&gt;		&lt;br /&gt;		WL(a.ImageRuntimeVersion);&lt;br /&gt;		&lt;br /&gt;		RL();&lt;br /&gt;	}&lt;br /&gt;	&lt;br /&gt;	&lt;font color="#cc0000"&gt;#region&lt;/font&gt; Helper methods&lt;br /&gt;&lt;br /&gt;	&lt;font color="#3300ff"&gt;private static void&lt;/font&gt; WL(&lt;font color="#3300ff"&gt;object&lt;/font&gt; text, &lt;font color="#3300ff"&gt;params object&lt;/font&gt;[] args)&lt;br /&gt;	{&lt;br /&gt;		Console.WriteLine(text.ToString(), args);	&lt;br /&gt;	}&lt;br /&gt;	&lt;br /&gt;	&lt;font color="#3300ff"&gt;private static void&lt;/font&gt; RL()&lt;br /&gt;	{&lt;br /&gt;		Console.ReadLine();	&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	&lt;font color="#cc0000"&gt;#endregion&lt;/font&gt;&lt;br /&gt;}&lt;/font&gt;
&lt;/pre&gt;&lt;img src="http://drowningintechnicaldebt.com/aggbug.aspx?PostID=428" width="1" height="1"&gt;</description><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/.NET/default.aspx">.NET</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Tips-n-Tricks/default.aspx">Tips-n-Tricks</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>Installing new Visual Studio SKUs after already installing SP1</title><link>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/07/26/installing-new-visual-studio-skus-after-already-installing-sp1.aspx</link><pubDate>Thu, 26 Jul 2007 17:55:00 GMT</pubDate><guid isPermaLink="false">4fe7e88d-b128-4946-bef2-079055b364e8:423</guid><dc:creator>twaldron</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://drowningintechnicaldebt.com/blogs/thomaswaldron/rsscomments.aspx?PostID=423</wfw:commentRss><comments>http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2007/07/26/installing-new-visual-studio-skus-after-already-installing-sp1.aspx#comments</comments><description>Since Visual Studio is modular, you can install multiple SKUs on top of each other. 
&lt;p&gt;You may run across the scenario where you have already installed the applicable SP1 package(s) for Visual Studio 2005 SKUs on your machine, and then install a new SKU (for example, installing VSTS 2005 Tester Edition after already applying SP1 packages to VSTS 2005 Developer Edition). In this case, it is necessary to re-install the applicable SP1 package(s), as documented here:&lt;br /&gt;&lt;a title="http://blogs.msdn.com/heaths/archive/2007/03/22/vs-2005-sp1-update-for-vista-requires-vs-2005-sp1.aspx" href="http://blogs.msdn.com/heaths/archive/2007/03/22/vs-2005-sp1-update-for-vista-requires-vs-2005-sp1.aspx"&gt;http://blogs.msdn.com/heaths/archive/2007/03/22/vs-2005-sp1-update-for-vista-requires-vs-2005-sp1.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There are two different Visual Studio 2005 SP1 packages that apply just to Visual Studio (regardless of OS being used):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=80653"&gt;Visual Studio 2005 Express Editions SP1&lt;/a&gt; &lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=80651"&gt;Visual Studio 2005 Team Suite SP1&lt;/a&gt; (works on Microsoft Visual Studio 2005 Standard, Professional, and all Team Editions)&lt;/li&gt;&lt;/ul&gt;Then, if running Windows Vista, the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=90E2942D-3AD1-4873-A2EE-4ACC0AACE5B6&amp;amp;displaylang=en"&gt;Visual Studio 2005 Service Pack 1 Update for Windows Vista&lt;/a&gt;, must be applied &lt;span style="FONT-WEIGHT:bold;"&gt;after&lt;/span&gt; the applicable patch(es) from the list above.&lt;br /&gt;&lt;img src="http://drowningintechnicaldebt.com/aggbug.aspx?PostID=423" width="1" height="1"&gt;</description><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/.NET/default.aspx">.NET</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/tags/Visual+Studio+Team+System+-+Database/default.aspx">Visual Studio Team System - Database</category></item></channel></rss>