<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Loosely coupled snippets</title><subtitle type="html">Occasional waffle from Tom Blackburn</subtitle><id>http://blogs.msdn.com/b/tblack/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/tblack/" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/b/tblack/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2007-08-30T21:14:00Z</updated><entry><title>Installing Windows 7 on an old machine (code 5 fun…)</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/tblack/archive/2009/12/03/installing-windows-7-on-an-old-machine-code-5-fun.aspx" /><id>http://blogs.msdn.com/b/tblack/archive/2009/12/03/installing-windows-7-on-an-old-machine-code-5-fun.aspx</id><published>2009-12-03T20:32:36Z</published><updated>2009-12-03T20:32:36Z</updated><content type="html">&lt;p&gt;I recently had to install a fresh copy of Windows 7 Home Premium on a relative’s six year old PC.&lt;/p&gt;  &lt;p&gt;Not anticipating any problems I booted from the 32-bit DVD and was expecting the installation process to start. This is when I saw the following BIOS error:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Cannot boot from CD Code 5&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;After a bit of searching I found that this was because the machine’s BIOS is quite old and doesn’t support the EFI boot records on the installation media.&lt;/p&gt;  &lt;p&gt;Next I dutifully updated the BIOS after burning a CD with the latest BIOS from the motherboard manufacturer’s website. Still no joy….&lt;/p&gt;  &lt;p&gt;After this failed, I tried installing from a USB stick containing the Windows 7 installation files. Still no joy…&lt;/p&gt;  &lt;p&gt;After deducing there was no easy way to force the machine to boot from the Windows 7 media, I thought I’d try and fool it by booting from something it understood.&lt;/p&gt;  &lt;p&gt;If this scenario sounds familiar to you, then these are the steps I followed to fix it.&lt;/p&gt;  &lt;p&gt;1. Boot the machine from a Vista installation DVD.    &lt;br /&gt;2. Choose a language, press Next, then choose Repair My Computer. 3. Next again, ignoring the driver selection, and choose “Command Prompt” for recovery.     &lt;br /&gt;4. Remove the Vista DVD and insert the Windows 7 DVD.     &lt;br /&gt;5. Change drive to the DVD, in most cases, &lt;strong&gt;D:      &lt;br /&gt;&lt;/strong&gt;6. Change directory to the sources folder (&lt;strong&gt;cd sources&lt;/strong&gt;)     &lt;br /&gt;7. Run setup by typing &lt;strong&gt;setup&lt;/strong&gt; and pressing return.     &lt;br /&gt;8. The Windows 7 set-up should now start     &lt;br /&gt;    &lt;br /&gt;Good luck!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9932182" width="1" height="1"&gt;</content><author><name>tblack</name><uri>http://blogs.msdn.com/tblack/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Multi-threaded robocopy in Windows 7</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/tblack/archive/2009/11/03/multithreaded-robocopy.aspx" /><id>http://blogs.msdn.com/b/tblack/archive/2009/11/03/multithreaded-robocopy.aspx</id><published>2009-11-03T14:25:35Z</published><updated>2009-11-03T14:25:35Z</updated><content type="html">&lt;p&gt;Robocopy has been part of Windows for a little while now. It's an excellent command line tool for copying files around if you haven't seen it before. &lt;/p&gt;  &lt;p&gt;New to Windows 7 (and Windows Server 2008 R2) is the /MT option. This causes robocopy to operate in multi-threaded mode which realises a noticeable performance boost. It's well worth trying it next time you have to copy a large number of files around. &lt;/p&gt;  &lt;p&gt;e.g. &lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;robocopy &lt;/font&gt;&lt;a href="file://\\server\share\folder"&gt;&lt;font face="Courier"&gt;\\server\share\folder&lt;/font&gt;&lt;/a&gt;&lt;font face="Courier"&gt; c:\users\tblack\downloads\folder /tbd /s /z &lt;strong&gt;/mt&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;You can see a full list of the available options by typing&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;robocopy /?&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;within a command prompt window. This is the help for the /mt option.&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;/MT[:n] :: Do multi-threaded copies with n threads (default 8). n must be at least 1 and not greater than 128. This option is incompatible with the /IPG and /EFSRAW options.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9916758" width="1" height="1"&gt;</content><author><name>tblack</name><uri>http://blogs.msdn.com/tblack/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>.NET Framework Source Code available</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/tblack/archive/2007/10/03/net-framework-source-code-available.aspx" /><id>http://blogs.msdn.com/b/tblack/archive/2007/10/03/net-framework-source-code-available.aspx</id><published>2007-10-03T19:49:39Z</published><updated>2007-10-03T19:49:39Z</updated><content type="html">&lt;p&gt;Have you ever been writing some code and got to the point where you just can't figure out what the .NET Framework is doing? You know, one of those really gnarly bugs that you just can't decide where the problem lies.&lt;/p&gt;  &lt;p&gt;Most good devs will reach for &lt;a href="http://www.aisto.com/roeder/" target="_blank"&gt;Lutz Roeder's&lt;/a&gt; &lt;a href="http://www.aisto.com/roeder/dotnet/" target="_blank"&gt;Reflector for .NET&lt;/a&gt; at this point and try and figure out what is happening in the .NET Framework. Wouldn't it be nice to have a fully integrated experience where you could debug from your code directly into the .NET Framework code?&lt;/p&gt;  &lt;p&gt;Today, Microsoft has announced that later this year, with the final release of Visual Studio .NET 2008, the source code to many of the .NET libraries will be released under the &lt;a href="http://www.microsoft.com/resources/sharedsource/licensingbasics/referencelicense.mspx" target="_blank"&gt;Microsoft Reference License&lt;/a&gt;. This means that you can browse and view the source code providing you accept the license terms.&lt;/p&gt;  &lt;p&gt;Additionally an Internet facing server will publish symbols for the source to allow an integrated debugging experience in VS.NET 2008. When debugging VS.NET will request source code from the server as needed when a developer steps in to .NET Framework code. The first download of the code will require explicit acceptance of the license but from then on you're free to debug all published .NET Framework source code.&lt;/p&gt;  &lt;p&gt;Scott Guthrie has published a post which provides further details along with several screen shots to show how this process works in anger. Check it out &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx" target="_blank"&gt;here&lt;/a&gt;!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5264771" width="1" height="1"&gt;</content><author><name>tblack</name><uri>http://blogs.msdn.com/tblack/ProfileUrlRedirect.ashx</uri></author><category term="Visual Studio" scheme="http://blogs.msdn.com/b/tblack/archive/tags/Visual+Studio/" /><category term=".NET Framework" scheme="http://blogs.msdn.com/b/tblack/archive/tags/-NET+Framework/" /></entry><entry><title>Converting VS2005 solutions to VS2008 Beta 2 (Orcas)</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/tblack/archive/2007/08/31/converting-vs2005-solutions-to-vs2008-beta-2-orcas.aspx" /><id>http://blogs.msdn.com/b/tblack/archive/2007/08/31/converting-vs2005-solutions-to-vs2008-beta-2-orcas.aspx</id><published>2007-08-31T15:26:00Z</published><updated>2007-08-31T15:26:00Z</updated><content type="html">&lt;p&gt;Visual Studio .NET 2008 (codename Orcas) is just around the corner. With the release of Beta2 a few weeks ago I decided to update some of our work to use VS.NET 2008 Beta 2 instead of VS.NET 2005. &lt;/p&gt;  &lt;p&gt;VS.NET 2008 Beta 2 introduces a host of productivity improvements for developers. Many of these are documented on &lt;a href="http://weblogs.asp.net/scottgu/rss.aspx" target="_blank" mce_href="http://weblogs.asp.net/scottgu/rss.aspx"&gt;Scott Guthrie's&lt;/a&gt; blog entry &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/07/26/vs-2008-and-net-3-5-beta-2-released.aspx" target="_blank" mce_href="http://weblogs.asp.net/scottgu/archive/2007/07/26/vs-2008-and-net-3-5-beta-2-released.aspx"&gt;here&lt;/a&gt;. Of particular interest to me is the multi-targeting feature introduced in Orcas. With previous versions of VS.NET each version was tied to a particular release of the .NET Framework. &lt;/p&gt;  &lt;p&gt;So, you have: &lt;/p&gt;  &lt;p&gt;VS.NET 2002 can only build .NET 1.0.    &lt;br /&gt;VS.NET 2003 can only build .NET 1.1.     &lt;br /&gt;VS.NET 2005 can only build .NET 2.0. &lt;/p&gt;  &lt;p&gt;Orcas allows the following permutations: &lt;/p&gt;  &lt;p&gt;VS.NET 2008 can build .NET 2.0 or .NET 3.0 or .NET 3.5. &lt;/p&gt;  &lt;p&gt;There's a great blog post by &lt;a href="http://blogs.msdn.com/somasegar/default.aspx" target="_blank" mce_href="http://blogs.msdn.com/somasegar/default.aspx"&gt;Soma&lt;/a&gt; &lt;a href="http://blogs.msdn.com/somasegar/archive/2006/05/18/601354.aspx" target="_blank" mce_href="http://blogs.msdn.com/somasegar/archive/2006/05/18/601354.aspx"&gt;here&lt;/a&gt; if you want to learn more about the differences between some of the more recent versions of the .NET Framework including an explanation of 'red' bits and 'green' bits. &lt;/p&gt;  &lt;p&gt;Multi-targeting is important to me because our customers currently use VS.NET 2005 and may well continue to do so for some time after VS.NET 2008 RTMs. Yet I'd like our development team to get the most out of the cool new features in Orcas without having to wait for all of our customers to upgrade. Multi-targeting allows us to do this by using VS.NET 2008 internally but shipping VS.NET 2005 code. &lt;/p&gt;  &lt;p&gt;However, there are a few issues to be weary of and I'll describe these below. &lt;/p&gt;  &lt;p&gt;When you open a VS.NET 2005 .sln file in VS.NET 2008 Beta 2 the Visual Studio Conversion Wizard steps in to convert files as required. The good news is that the .csproj file formats have not changed. However the .sln, .vsmdi amd .testrunconfig file formats have all changed. &lt;/p&gt;  &lt;p&gt;If the conversion wizard runs fine, the resulting solution should compile and run in VS.NET 2008 Beta 2 quite happily. For our project we need to ship the source code as well as binaries so the upgraded projects have to also continue working in VS.NET 2005 and this is where I found problems. &lt;/p&gt;  &lt;p&gt;Because we must maintain compatibility between the two VS.NET versions, and we have incompatible file formats (.sln, .vsmdi &amp;amp; .testrunconfig) we maintain multiple copies of the files that have changed format. This means that under source control we have: &lt;/p&gt;  &lt;p&gt;Main.sln AND MainVS9.sln    &lt;br /&gt;Main.vsmdi AND MainVS9.vsmdi     &lt;br /&gt;LocalWithCoverage.testrunconfig AND LocalWithCoverageVS9.testrunconfig &lt;/p&gt;  &lt;p&gt;Maintaining parallel copies of these files isn't great but due to our requirement to support both formats and lack of time to develop an automated build based solution this is what we have at present. &lt;/p&gt;  &lt;h3&gt;Conversion problems&lt;/h3&gt;  &lt;p&gt;This issue is to do with the .csproj files for Web Application Projects which are format compatible between VS.NET 2005 and VS.NET 2008 Beta 2. If I open my original unconverted Main.sln in VS.NET 2005 it references the converted, but compatible, .CSProj files contained in my solution. Within any Web Application Projects the conversion changes the following line (amongst other things) &lt;/p&gt;  &lt;p&gt;Before conversion: &lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;#xA0; &amp;lt;Import Project=&amp;quot;$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v8.0\WebApplications\Microsoft.WebApplication.targets&amp;quot; /&amp;gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;After conversion: &lt;/p&gt;  &lt;p&gt;&amp;#xA0; &lt;font face="Courier New"&gt;&amp;lt;Import Project=&amp;quot;$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets&amp;quot; /&amp;gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;If you try this on a machine without VS.NET 2008 Beta 2 installed the project will fail to load because it cannot find the v9.0 path being referred to. The solution is to alter the converted line and replace it (using Notepad) with: &lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;lt;Import Project=&amp;quot;$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v8.0\WebApplications\Microsoft.WebApplication.targets&amp;quot; Condition=&amp;quot; '$(Solutions.VSVersion)' == '8.0'&amp;quot; /&amp;gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;lt;Import Project=&amp;quot;$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets&amp;quot; Condition=&amp;quot; '$(Solutions.VSVersion)' == '9.0'&amp;quot; /&amp;gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;This way the correct version of the Web Application Projects targets will be loaded depending on the version of VS.NET you are using.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4668868" width="1" height="1"&gt;</content><author><name>tblack</name><uri>http://blogs.msdn.com/tblack/ProfileUrlRedirect.ashx</uri></author><category term="Visual Studio" scheme="http://blogs.msdn.com/b/tblack/archive/tags/Visual+Studio/" /><category term="ASP.NET" scheme="http://blogs.msdn.com/b/tblack/archive/tags/ASP-NET/" /></entry><entry><title>Microsoft Health Common User Interface</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/tblack/archive/2007/08/30/microsoft-health-common-user-interface.aspx" /><id>http://blogs.msdn.com/b/tblack/archive/2007/08/30/microsoft-health-common-user-interface.aspx</id><published>2007-08-30T23:14:00Z</published><updated>2007-08-30T23:14:00Z</updated><content type="html">&lt;P&gt;For the last couple of years I've been working in a team collaborating with the &lt;A href="http://www.nhs.uk/aboutnhs/howthenhsworks/Pages/HowtheNHSworks.aspx" target=_blank mce_href="http://www.nhs.uk/aboutnhs/howthenhsworks/Pages/HowtheNHSworks.aspx"&gt;UK National Health Service&lt;/A&gt; (NHS). We've worked extensively with patient safety experts, clinicians, user interface designers, ISVs and representatives from the NHS' IT agency - &lt;A href="http://www.connectingforhealth.nhs.uk/" target=_blank mce_href="http://www.connectingforhealth.nhs.uk/"&gt;Connecting for Health&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;The purpose of this work? To produce a set of &lt;A href="http://www.asp.net/ajax/" target=_blank mce_href="http://www.asp.net/ajax/"&gt;ASP.NET AJAX&lt;/A&gt; and Winforms controls together with some associated guidance that attempts to standardize clinical user interfaces. The guidance is designed to be platform agnostic so that it can be used in a broad range of environments. Whereas the controls embody the guidance using the Microsoft platform. &lt;/P&gt;
&lt;P&gt;Two years ago the work started out as some early prototypes, preliminary guidance and some embryonic ASP.NET 2.0 Beta 2 controls. While the guidance work progressed we spun up a parallel track of work to develop a &lt;A href="http://msdn2.microsoft.com/en-us/netframework/aa663326.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/netframework/aa663326.aspx"&gt;Windows Presentation Foundation&lt;/A&gt; (WPF) Demonstrator. This had many purposes that included engaging ISVs, providing a visionary look at future clinical user interfaces and demonstrating the capabilities of Microsoft's emerging UI platform. &lt;/P&gt;
&lt;P&gt;While the Demonstrator proved to be very successful in raising the profile of the work we were doing it was clear that ISVs had a more immediate need for controls they could use in their current generation of applications. For this reason we've spent the last 6 months producing a set of ASP.NET AJAX based controls that lean heavily on the functionality provided by the &lt;A href="http://www.codeplex.com/AtlasControlToolkit" target=_blank mce_href="http://www.codeplex.com/AtlasControlToolkit"&gt;AJAX Control Toolkit&lt;/A&gt;. They come complete with SDK style documentation that integrates into the Visual Studio help collection. &lt;/P&gt;
&lt;P&gt;Until very recently much of this work has remained between Microsoft, the NHS and selected ISVs. However recently, with the encouragement of &lt;A href="http://msdn.microsoft.com/healthcare" target=_blank mce_href="http://msdn.microsoft.com/healthcare"&gt;Microsoft Corporate Healthcare&lt;/A&gt;, much of the work has been published publicly at &lt;A href="http://www.mscui.net/" mce_href="http://www.mscui.net"&gt;http://www.mscui.net&lt;/A&gt;. A large part of the &lt;A href="http://www.mscui.net/DesignGuide/DesignGuide.aspx" target=_blank mce_href="http://www.mscui.net/DesignGuide/DesignGuide.aspx"&gt;guidance&lt;/A&gt; produced to date is available for download as well as the associated &lt;A href="http://www.mscui.net/ControlsAndSamples.aspx" target=_blank mce_href="http://www.mscui.net/ControlsAndSamples.aspx"&gt;controls&lt;/A&gt; along with their source code. &lt;/P&gt;
&lt;P&gt;We're starting to see some discussion now in the wider community and I'd encourage anyone with an interest in improving patient safety via a common user interface to participate in the &lt;A href="http://www.codeplex.com/mscui/Thread/List.aspx" target=_blank mce_href="http://www.codeplex.com/mscui/Thread/List.aspx"&gt;discussions forums&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;The work will continue now and is planned for at least another 18 months. We'll continue to work with our partners and listen to the community as we strive to work towards better, more consistent and safer clinical user interfaces.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4653783" width="1" height="1"&gt;</content><author><name>tblack</name><uri>http://blogs.msdn.com/tblack/ProfileUrlRedirect.ashx</uri></author><category term="MSCUI" scheme="http://blogs.msdn.com/b/tblack/archive/tags/MSCUI/" /><category term="ASP.NET" scheme="http://blogs.msdn.com/b/tblack/archive/tags/ASP-NET/" /><category term="AJAX" scheme="http://blogs.msdn.com/b/tblack/archive/tags/AJAX/" /></entry></feed>