Tuesday, May 16, 2006

SQL Server Integration Services LoadXml fails with a message about an invalid provider

Ran into this today on my laptop. Fired up BIStudio to test some SSIS packages on my local machine.  I couldn’t even load the package due to the LoadXml error mentioned above complaining about the FLATFILE provider.  Come to find out this has to do with something, LEXMARK printer drivers and Flash 8 are suspects, mucking with the security around component categories.  I found some code that when run as a low privileged user will find the bad entries:

 

using System;
using Microsoft.Win32;

namespace CheckClsidPerm
{
    class Program
    {
        static void Main(string[] args)
        {
            RegistryKey clsid = Registry.LocalMachine.OpenSubKey(@"Software\Classes\CLSID");
            string[] clsids = clsid.GetSubKeyNames();
            Console.WriteLine("found {0} keys", clsids.Length);

            foreach (string s in clsids)
            {
                try
                {
                    using (RegistryKey clsidKey = clsid.OpenSubKey(s))
                    {
                        using (RegistryKey ic = clsidKey.OpenSubKey("Implemented Categories"))
                        {
                        }
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine("error while reading key {0}: {1}", s, e.Message);
                }
            }
        }
    }
}

Run this under a low privilege account.  Then go in and find the CLSIDs in HKEY_CLASSES_ROOT and add Users with read access.  This fixed the issue for me.

Tuesday, May 16, 2006 11:43:02 AM (Pacific Standard Time, UTC-08:00)   #      Comments [1]  
 

  Monday, May 15, 2006

CodePlex is Live

Remember the good old days of GotDotNet?  Before the interminable slow downs and the littering of the various areas with samples of dubious value?

Sandy Khahund and Jim Newkirk from the Patterns and Practices group moved to MSOPS to bring back those good old days. Their first effort, CodePlex (http://www.codeplex.com), hopes to solve many of those issues.  Still in beta but looking very good.

Check it out when you get a chance.

Monday, May 15, 2006 10:29:24 AM (Pacific Standard Time, UTC-08:00)   #      Comments [2]  
 

  Tuesday, April 18, 2006

MSH Convert an Absolute Directory to a Relative Directory

Still working on the conversion.  Now I am working up a script to create solution files that will be consumed by Team Build.  Solution files however require relative references to the projects.  Come to find out there is no functionality built into .NET to do this conversion.  Since I didn't want to pick up any dependencies in my MSH script I created the function in MSH with inspiration from Paul Welter:

 

# function that takes an absolute path and turns it into a relative path
function relativePath([string]$absolutePath, [string]$relativeTo)
{
    # Add some error checking
    
    # split up the paths
    $absoluteDirectories = $absolutePath.Split("\")
    $relativeDirectories = $relativeTo.Split("\")
    
    # Get the shortest of the two paths
    [int] $length = [System.Math]::Min($absoluteDirectories.length, $relativeDirectories.length)
    
    # Use to determine where in the loop we exited
    [int] $lastCommonRoot = -1
    
    # Find common root
    for( $i = 0 ; $i -lt $length ; $i++ )
    {
        if($absoluteDirectories[$i] -ne $relativeDirectories[$i])
        {
            break
        }
        
        $lastCommonRoot = $i            
    }
    
    
    # If we didn't find a common prefix then throw
    if($lastCommonRoot -eq -1)
    {
        throw "The paths $absolutePath and $relativeTo do not have a common prefix path."
    }
    
    # build up the relative path
    [System.Collections.Specialized.StringCollection] $relativePath = new-object System.Collections.Specialized.StringCollection
    
    # add on the ..
    for( $i = $lastCommonRoot + 1 ; $i -lt $absoluteDirectories.length ; $i++ )
    {
        if($absoluteDirectories[$i].length -gt 0)
        {
            $relativePath.Add("..") > null
        }
    }
    
    # add on the folders
    for( $i = $lastCommonRoot + 1 ; $i -lt $relativeDirectories.length ; $i++ )
    {
        $relativePath.Add($relativeDirectories[$i]) > null
    }
    
    [string[]] $relativeParts = new-object String[]($relativePath.Count)
    $relativePath.CopyTo($relativeParts, 0)
    [string] $newPath = [System.String]::Join("\", $relativeParts)
    
    return $newPath
}

relativePath "C:\dir1\dir2\dir5" "C:\dir1\dir2\dir3\dir4\dir6" 
Tuesday, April 18, 2006 4:26:07 PM (Pacific Standard Time, UTC-08:00)   #      Comments [0]   MSH
 
MSH Upgrade all CSProj files in a directory

I am currently working on our .NET 1.1 to .NET 2.0 conversion project at Vertafore.  After recently listening to the Hanselminutes on Msh I figured I would give it a spin.

One of the items we needed to do was run the command line upgrade across all of our projects.  At last count we had around 400 so this was a tall order.

Turns out it was only 5 lines of MSH!

Here it is for anyone else that wants it:

$devenv = "C:\program files\Microsoft Visual Studio 8\Common7\IDE\devenv.com"

foreach ($project in get-childitem -include *.csproj -recurse) {

   write-host "Upgrading Project: " $project

   & $devenv $project /Upgrade

}

Tuesday, April 18, 2006 4:20:53 PM (Pacific Standard Time, UTC-08:00)   #      Comments [0]   MSH
 

  Tuesday, March 21, 2006

Recruiting from Guy Kawasaki

You may be noticing a theme today.  I am finding a number of good links today I am posting for posterity.

http://blog.guykawasaki.com/2006/03/the_art_of_recr.html

Tuesday, March 21, 2006 1:47:03 PM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 
Versioning Strategies for Data http://toadbalancing.blogspot.com/2005/12/preparing-for-backwards-compatibility.html Tuesday, March 21, 2006 1:42:14 PM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 
Negotiation

Great article on Negotiation.  I see myself unconsciously doing many of the things mentioned in the article but learned a few new tricks while reading through it.  Posted here so I don't lose it!

http://www.agilekiwi.com/negotiation.htm

Tuesday, March 21, 2006 1:40:57 PM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Wednesday, March 01, 2006

TFS vNext

Brian Harry posted asking what should be in Team Foundation Server vNext.

I have several pet features that were cut at the SDRs I went to that I would like to drop back in the hat:

 Aggregation - At most large shops there will never be a single TFS Project.  Yet management needs a view into the projects across the entire corporation. Give me a way to get consolidated views of where all my projects are at, how much effort was expended in a release, i.e. what it is actually costing me to build my software and what is the big picture.

 Occasionally connected developer - give me a way to still do source control while I am disconnected from TFS.  Then when I get back into the office let me resync the source control systems.  This allows me to still checkpoint my work as I refactor while on the plane but still have visibility into the steps I went through when I get back into the office.

 Methodology Editors - Just about everyone would love to change the methodologies in some minor way but the bar to doing this is pretty high. We have great Windows Forms and ASP.NET designers, why am I hand editing XML files to change the layout of work items?  Reminds of editing dialog resources in the dark days of windows.

 Web UI / Customer Portal - Not all of the consumers of TFS data are users of the IDE.  The Sharepoint site was a great start in this direction but step it up. Add a way to enter work items directly in the sharepoint site.  Give me a way to create a customer facing portal that gives them some limited visibility into my methodology.  i.e. be able to enter/search work items, get builds and look at fixes in SCM.

 Better Integration Tools - MSBuild is cool.  But once again I am back in the dark ages editing XML by hand!  Make the Team Build wizard re-entrant so I can make changes.  Better yet use your wizzy new DSL toolkit to give me a DSL that sits on top of MSBuild and gives me a nice UI to create/edit/maintain my build scripts.  Extend the build system to do things like help me build my database from scratch out of artifacts checked into the SCM system.  Almost every team needs to do this yet the tools are lacking at best.

Those are a start!

Wednesday, March 01, 2006 3:02:09 PM (Pacific Standard Time, UTC-08:00)   #      Comments [3]  
 

  Friday, February 17, 2006

VSLive Las Vegas Call for Papers

VSLive is heading back to Las Vegas. I am responsible for the whole show this time around both SmartClient and ASPLive tracks.  You can find the submission site right here: http://www.ftponline.com/conferences/callforpapers/

Get those submissions in and hopefully I will see you in Las Vegas!

Friday, February 17, 2006 10:54:36 AM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Monday, February 13, 2006

Employment Status Change

Big change for me today.  After 5 years of being independent and running my own company I accepted a position with a local company today.  As of today I am now Chief Architect for Vertafore. I have been working with these guys in a consulting role for the last few years and they for some reason thought it was just an extended job interview! I am excited to continue to work with the great team at Vertafore.

I will likely keep this blog in place but it may move at some point in the future.  Will let everyone know.

Monday, February 13, 2006 2:41:13 PM (Pacific Standard Time, UTC-08:00)   #      Comments [5]  
 


Administration
Sign In