Digital Thoughts : Software relating to software development, primarily using .NET.en-GBCommunityServer 1.1 (Build: LakinDerek Lakin ( the Betas, 28 Nov 2005 10:35:00 GMT31eb02f0-ccfc-4712-8b04-2b5c7351f0c8:590Derek LakinDerek Lakin ( you haven't yet installed the release version of one of the Visual Studio 2005 editions then you may find <A href="">this Microsoft&nbsp;page</A>&nbsp;particularly useful as it includes a link to an auto-uninstall tool for automatically removing any previous beta releases. It also includes manual uninstall instructions.<img src="/aggbug_PostID_590.html" width="1" height="1">Derek LakinDerek Lakin ( Visualizers for Visual Studio 2005, 28 Nov 2005 10:19:00 GMT31eb02f0-ccfc-4712-8b04-2b5c7351f0c8:589Derek LakinDerek Lakin (<P><A href="#topofpage">Roy Osherove</A> (author of the Regulator) has just released a <A href="#topofpage">Regex Debug Visualizers kit for Visual Studio 2005</A>.</P> <BLOCKQUOTE dir=ltr> <P>Visual Studio allows creating "Debug Visualizers" for all types in .NET framework as well as custom types.<BR>You can find such visualizers for Datasets, strings and XML. There wasn't one for Regular expressions, until now.<BR>These visualizers allow you to "visualize" the following types:</P> <P>System.String<BR>System.Text.RegularExpressions.Regex<BR>System.Text.RegularExpressions.Match<BR>System.Text.RegularExpressions.MatchCollection</P></BLOCKQUOTE> <P dir=ltr>I generally prefer to use <A href="#topofpage">Expresso</A>, but I do have Regulator installed too. Personally I've had more consistent results with Expresso and I like the way it keeps a history of all your regex changes, but I'm keen to see how Regulator 3.0 pans out.</P><img src="/aggbug_PostID_589.html" width="1" height="1">Derek LakinDerek Lakin ( in Windows Applications, 24 Nov 2005 09:54:00 GMT31eb02f0-ccfc-4712-8b04-2b5c7351f0c8:586Derek LakinDerek Lakin (<P>I've often heard that you can use the ASP.NET caching features&nbsp;provided by&nbsp;the .NET Framework in Windows applications, but never tried it. Well, today I read <A href="#topofpage">a post by the great Scott Hanselman</A>&nbsp;that confirms it:</P> <BLOCKQUOTE dir=ltr> <P>&nbsp;I also started a conversation on a list server and here's what came of that:</P> <P dir=ltr><A href="#topofpage">Rob Howard said:</A> </P> <BLOCKQUOTE dir=ltr> <P><EM>Yes, it's fairly common (and easy) to do. You just have to include a reference to the System.Web assembly in non-web applications; which may have led to your "creep out" – for what it’s worth it used to do the same to me&nbsp;:)</EM><EM>&nbsp;<BR></EM><EM>FWIW, I believe (from memory) the recommended way you grab a reference outside of a web application is:<BR></EM><EM>using System.Web;<BR></EM><EM>using System.Web.Caching;<BR></EM><EM>…<BR></EM><EM>Cache cache = HttpRuntime.Cache;<BR></EM><EM>&lt;snip&gt;...the Cache is just too important of a feature to only belong to ASP.NET.</EM></P></BLOCKQUOTE></BLOCKQUOTE> <P dir=ltr>It seems that the biggest obstacle most people come across is a psychological one of actually adding a reference to System.Web and System.Web.Caching! Once you can get over that then you have access to the great lightweight caching features, including the cache expiration stuff.</P> <P dir=ltr>One commenter did suggest that you could always use the <A href="#topofpage">Enterprise Library Caching Block</A> from the <A href="#topofpage">Microsoft patterns &amp; practices website</A>, but I would tend to agree with Scott: there's just too much going on with the caching block and probably a bit too heavyweight for a lot of applications.</P> <P dir=ltr>Now I can't wait to try this out in my next Windows application!</P><img src="/aggbug_PostID_586.html" width="1" height="1">Derek LakinDerek Lakin ('s Baby and Web 2.0, 18 Nov 2005 11:45:00 GMT31eb02f0-ccfc-4712-8b04-2b5c7351f0c8:580Derek LakinDerek Lakin (<P>In addition to the kind of posts I've been churning out here I'm now writing (generally) lengthier posts on <A href="#topofpage">Bill's Baby</A> and <A href="#topofpage">Web 2.0 Blog</A>, both part of the <A href="#topofpage">FineFools community</A>. </P> <P>The Bill's Baby blog is all about Microsoft,&nbsp;to which my contributions are developer focused. Recent posts include my <A href="#topofpage">review of the UK Launch Tour</A> for Visual Studio/SQL Server 2005 and <A href="#topofpage">Which Visual Studio Edition is Right For Me?</A></P> <P>The Web 2.0 Blog, as it's name suggests, is all about Web 2.0 with recent posts covering <A href="">Microsoft's Live service announcement</A> and a <A href="#topofpage">description of what Ajax is</A>.</P> <P>I'm just wondering if I should add them in to my <A href="#topofpage">combined Feedburner feed</A> or not. Any preferences?</P><img src="/aggbug_PostID_580.html" width="1" height="1">Derek LakinDerek Lakin ( Free Stuff!, 14 Nov 2005 11:26:00 GMT31eb02f0-ccfc-4712-8b04-2b5c7351f0c8:578Derek LakinDerek Lakin (<P>Continuing the tradition of signingup for free developer goodies here's a post about more free stuff. Over at the Component Factory the <A href="#topofpage">Krypton Toolkit</A>&nbsp;has been released. Just go to the <A href="#topofpage">Downloads</A> link and enter your email address to receive instructions. The Krypton Toolkit is a .NET 2.0 user&nbsp;interface control library for Windows Forms with full support for Visual Studio 2005 that is free for commercialuse.</P> <P>In addition to this they are also <A href="#topofpage">offering a free license</A> and 12 months subscription to Crownwood Software's <A href="#topofpage">DotNetMagic</A>&nbsp;simply by blogging about the Krypton Toolkit release.</P><img src="/aggbug_PostID_578.html" width="1" height="1">Derek LakinDerek Lakin ( 2.1 Database for .NET Has Been Released, 01 Nov 2005 10:22:00 GMT31eb02f0-ccfc-4712-8b04-2b5c7351f0c8:573Derek LakinDerek Lakin (<P>I'm always on the lookout for free stuff, especially when it comes to software development. I've heard a lot of buzz in the past about <A href="#topofpage">VistaDB</A>, especially with reagrd to it's small footprint, which makes it ideal for distributing online. Now it seems that they're offering a free copy if you blog about their latest release, so here's what they say:</P> <BLOCKQUOTE dir=ltr> <P>"This 2.1 update includes over 60 improvements, including new support for .NET 2.0 and Visual Studio .NET 2005. VistaDB is a small-footprint, embedded SQL database alternative to Jet/Access, MSDE and SQL Server Express 2005 that enables developers to build .NET 1.1 and .NET 2.0 applications. Features SQL-92 support, small 500KB embedded footprint, free 2-User VistaDB Server for remote TCP/IP data access, royalty free distribution for both embedded and server, Copy 'n Go! deployment, managed ADO.NET Provider, data management and data migration tools. Free trial is available for download.<BR><A href="#topofpage">- Learn more about VistaDB</A><BR><A href="#topofpage">- Repost this to your blog and receive a FREE copy of VistaDB 2.1!</A>" </P></BLOCKQUOTE><img src="/aggbug_PostID_573.html" width="1" height="1">Derek LakinDerek Lakin ( Refactoring, 08 Oct 2005 16:49:00 GMT31eb02f0-ccfc-4712-8b04-2b5c7351f0c8:565Derek LakinDerek Lakin (<P>Visual Studio provides some really good refactoring tools, such as renaming, so that if you rename a class for example a smart tag pops up and allows you to rename and references.</P> <P>Today, however, I noticed that this is all done automatically if you rename the file that the class is contained in!! Cool <IMG src="/file///C/Program20Files/imeem/resources/smiley_veryhappy.png" align=absMiddle></P><img src="/aggbug_PostID_565.html" width="1" height="1">Derek LakinDerek Lakin ( and Unit Testing, 30 Sep 2005 15:45:00 GMT31eb02f0-ccfc-4712-8b04-2b5c7351f0c8:560Derek LakinDerek Lakin (<P>I've written enough code to start debugging and unit testing now (no flaming about writing unit tests first, etc, please!). The Create Unit Tests feature is really nice. With virtually no effort at all you can set up unit tests to start exercising your code.</P> <P>One thing worth noting is that you can't have Code Coverage Analysis (which is very cool) enabled while your debugging tests.</P> <P>The main purpose of this particular post, though is to raise an eyebrow of confusion over the debugging facilities. For as long as I can remember I've been able to Step In, Step Out, Step Over and Run to Cursor whilst debugging (Visual C++ had this and Visual Studio .NET too). However, my beloved Visual Studio 2005 seems to have restricted this down to just Step Over and Run to Cursor.</P> <P>You can still set a breakpoint somewhere else and run to it, or find the method you want to step in to and choose run to cursor, but this is nowhere near as efficient or convenient as Step In and Step Out.</P> <P>I'm hoping I just haven't found the right menu, toolbar or keyboard shortcut yet.</P> <P><STRONG>Update:</STRONG> I just found them! You need to customise your toolbar/menu to do it, but they are there if you look hard enough. Another one of those things that I hope doesn't stay like this when it's released.</P><img src="/aggbug_PostID_560.html" width="1" height="1">Derek LakinDerek Lakin ( to Slide, 30 Sep 2005 09:18:00 GMT31eb02f0-ccfc-4712-8b04-2b5c7351f0c8:551Derek LakinDerek Lakin (<P><A href="#topofpage">Paul</A> introduced me to <A href="#topofpage">Slide</A> yesterday and I downloaded it and started using it this morning. It presents a "ticker" on your desktop of channels of photos. You can add existing channels from their channel guide and create your own from files, folders or RSS feeds. You can also share your channels with your friends (what good web app these days doesn't allow you to share with your friends? I'm surprised it doesn't have tagging too <IMG src="/images/emoticons/emotion_4.gif">).</P> <P>Other people can see your Slide collections online too; mine is at <A href="#topofpage"></A> and you can put a ticker of a particular public channel on your website with a simple line of javascript like this (a public feed from the <A href="#topofpage">ilikecameras</A> group pool on Flickr:</P> <P> <BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><PRE>&lt;script src="<A href="#topofpage"></A>" type="text/javascript"&gt;&lt;/script&gt;</PRE></BLOCKQUOTE> <p><script src="" type="text/javascript"></script></p><img src="/aggbug_PostID_551.html" width="1" height="1">Derek LakinDerek Lakin ( SauceReader Release(ish), 30 Sep 2005 09:15:00 GMT31eb02f0-ccfc-4712-8b04-2b5c7351f0c8:550Derek LakinDerek Lakin (<P>According to the Sauce Reader blog there is a new version of Sauce Reader available v2.0.2, which is just a minimal update to make it non-expiring (apparently v2.0.1 expires today). Unfortunately the link to the download is not responding! What will I use if I can't continue with Sauce Reader? Aaaaaarrrggghhh the world will end!</P> <BLOCKQUOTE dir=ltr> <P>"This is a minimal update to Sauce Reader that is a non-expiring version. Sauce Reader v2.0.1 expires today, so please <A href="">download and install</A> the new version immediately."</P></BLOCKQUOTE> <P dir=ltr>Update: The download is working now.</P><img src="/aggbug_PostID_550.html" width="1" height="1">Derek LakinDerek Lakin (, 29 Sep 2005 15:44:00 GMT31eb02f0-ccfc-4712-8b04-2b5c7351f0c8:559Derek LakinDerek Lakin (<P>If you ever get all anal about your version numbers then you've probably played around with the AssemblyVersion and AssemblyFileVersion attributes in AssemblyInfo.cs.</P> <P>In Visual Studio .NET 2003 the AssemblyInfo.cs that you get by default just specifies the AssemblyVersion attribute and the comment above it tells you that you can either explicitly specify or you can specify major.minor.* which generates a build and revision for you.</P> <P>In Visual Studio 2005 the default AssemblyInfo.cs generated file adds the AssemblyFileVersion attribute aswell. This attribute is the one that is used by Win32 to report the verison and according to the documentation it does not accept wildcards (like AssemblyVersion does), but the comment remains the same.</P> <P>According to the <A href="#topofpage">docs</A>:</P> <BLOCKQUOTE dir=ltr> <P>"<EM>The file version is normally a string of four numbers, separated by periods, reflecting the major version number, minor version number, build number, and revision number; for example, "1.0.4309.00". If version is not in this format, a compiler warning occurs, and the results displayed in the file properties dialog are unpredictable. Wildcards are not supported.</EM>"</P></BLOCKQUOTE> <P>So you can have a generated AssemblyVersion, but not AssemblyFileVersion, however, if you exclude the AssemblyFileVersion (like VS .NET 2K3) then the value is set to the same as AssemblyVersion anyway.</P> <P>I'm sure somewhere you can change what you get as a default AssemblyInfo.cs, but I haven't found where yet. When I find it I'll set the CLSCompliant and SecurityAttribute permissions too as they both flag warnings when absent if you run a Code Analysis on your project.</P><img src="/aggbug_PostID_559.html" width="1" height="1">Derek LakinDerek Lakin ( Snippets, 29 Sep 2005 15:42:00 GMT31eb02f0-ccfc-4712-8b04-2b5c7351f0c8:558Derek LakinDerek Lakin (<P>Code Snippets are great! Just type '?' and then hit &lt;TAB&gt; and you can choose from the available snippets <EM>or</EM>&nbsp;you can right-click in the code editor and choose "Insert Snippet..." <EM>or</EM> you can type the abbreviation for a snippet and hit tab.</P> <P>Once you've inserted your snippet you can then just hit &lt;TAB&gt; to cycle through the fields you need to fill in. So far I've been using "prop" to insert a new private field with a matching public property (you can use "propg" to insert a read-only property).</P> <P>My personal preference is to prefix member variables with "<STRONG>this.</STRONG>" (partly because it provides a visual cue as to whether the variable is local or a member, but mostly because it's a quick way to get intellisense!) and to my delight I found that the snippets are just XML files with a .snippet file extension stored in \Microsoft Visual Studio 8\VC#\Snippets\1033\.</P> <P>It's a really simple modification to just change the template to add "this." in front of the right parts <IMG src="/file///C/Program20Files/imeem/resources/smiley_veryhappy.png" align=absMiddle> but in case you're too lazy too do it yourself I've included my modified version in my Code Snippets shared files here on imeem.</P> <P>There is a Snippet Editor available and it's an Open Source effort hosted on <A href="#topofpage">GotDotNet</A>:</P> <BLOCKQUOTE dir=ltr> <P>"<EM>Are you eager to produce your own Visual Basic Code Snippets but prefer not to think in terms of angle brackets? The Visual Basic Snippet Editor is a Windows Forms application with UI for creating, editing, testing VB code snippets. You can specify snippet code and metadata (e.g., title, author, description, keyboard shortcut), replacement variables, and referenced assemblies. You can preview your snippet as it will appear when inserted into the code window, and you can even test whether it will compile.</EM>"</P></BLOCKQUOTE> <P>Unfortunately, it seems to only work on the Beta 2 release of VS, but source code is provided so presumably I could re-compile and try again.</P><img src="/aggbug_PostID_558.html" width="1" height="1">Derek LakinDerek Lakin ( Show Solution, 29 Sep 2005 15:39:00 GMT31eb02f0-ccfc-4712-8b04-2b5c7351f0c8:557Derek LakinDerek Lakin (<P>By default the "Always show solution" option is off by default, which leads to the confusion I detailed in my <a href="/archive/2005/09/28/556.html">previous</A> <a href="/archive/2005/09/28/555.html">posts</A>.</P> <P>To turn it on (and thereby enable multi-project solutions) go to Tools &gt; Options &gt; Projects &amp; Solutions &gt; General.</P><img src="/aggbug_PostID_557.html" width="1" height="1">Derek LakinDerek Lakin ( Tour 2005: I'll be there!, 29 Sep 2005 09:11:00 GMT31eb02f0-ccfc-4712-8b04-2b5c7351f0c8:549Derek LakinDerek Lakin (<P>I just registered for the <A href="#topofpage">UK Launch</A> of Visual Studio 2005* at the Birmingham International Conference Centre on November 8th.</P> <P>Let me know if you'll be there and we can arrange to meet up and say hi.</P> <P>* And SQL Server 2005 and BizTalk Server 2006</P><img src="/aggbug_PostID_549.html" width="1" height="1">Derek LakinDerek Lakin ( Studio 2005 for Dummies, 28 Sep 2005 16:15:00 GMT31eb02f0-ccfc-4712-8b04-2b5c7351f0c8:547Derek LakinDerek Lakin (<P>I've started to explore Visual Studio 2005 (at last) by working on a project that's been on hold for too long. I'm not talking about the project itself publicly just yet, but I am working with&nbsp;a closed group of people on a private meem on <A href="#topofpage">imeem</A>. I'm blogging about my experiences with VS 2K5 (and SQL 2K5) on an imeem blog because then all my experiences with this project are in the same place.</P> <P>The <A href="#topofpage">first post</A> reads as follows:</P> <BLOCKQUOTE dir=ltr> <P>"If you want to create an ASP .NET Web application the first thing to remember is that you choose File &gt; New &gt; Web Site.&nbsp;File &gt; New &gt; Project and Start Page &gt; Create &gt; Project don't give you access to ASP .NET apps.</P> <P>The next thing to think about is: Do you want to have other projects as part of the solution? If you do just create an Empty Solution first and then you can add Projects and Web Sites to that Solution from the Solution Explorer."</P></BLOCKQUOTE><img src="/aggbug_PostID_547.html" width="1" height="1">