The Problem
So, let's say you are building a claims-based application for Active Directory Federation Services (ADFS) and you want to use VS.NET 2005 to do this. Alternately, let's say you are customizing some of the built in pages that come with the federation server or federation server proxy and want to use VS.NET for that.
As things stand today, there is a minor annoying friction point here as the ADFS installer doesn't provide a nice clean way to set a reference to the code you need in System.Web.Security.SingleSignOn and such. Even if you are developing on a 2003 box (which a lot of serious web devs do, although I still stumble along with XP as its the company standard) and actually install ADFS, you don't see these assemblies in the .NET tab on the add reference UI. The problem is that the ADFS installer puts the assemblies directly in the GAC and doesn't leave a copy on the "normal" file system (which the compilers actually need), nor does it bother to create a registry key under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx
(which is the little bit of magic that gets your assembly in the .NET tab). Multiply this by a large team working on a claims app, and this can be a drag.
The Solution
So, what's a dev to do? Well, you can definitely copy the assemblies yourself, GAC them and create a registry key and probably do all that with a little batch file if you are so inclined. Or, you can go over the top and create your own MSI installer package that does this for you.
As a little experiment to see if I could do this quickly and learn how to do some new stuff in MSI that thought I'd need later on, I did the latter. It took about an hour over lunch one day.
I'd love to just distribute the msi package directly, but I won't consider doing that unless MS gives me permission to do so (which I don't expect to get). So, that won't happen. However, I will tell you how to build your own (fairly) painlessly. For this, you will need:
Ingredients
Recipe
You now have a working msi installer that will install (and uninstall and repair!) these things for you. You may notice that the UI thing I used, WiXUI, shows a license screen and shows the CPL license there. That's because we didn't supply a license.rtf file in our directory, so WiXUI picked up the one that comes with WiX in its directory. Feel free to change it. If you want to eliminate that dialog completely, you are on your own.
Caveats
The Future
I'm hoping that future versions of ADFS will have this scenario already considered so that things like this won't be necessary. Perhaps we can convince the team to ship this as part of the product or as a free download/sample solution? I wouldn't be surprised to see these assemblies in a future version of the .NET Framework as well, which would mean that we'd get this for free another way. Until then...
(Updated 2 Aug 2006 changed to zip file)
Remember Me
Theme design by Jelle Druyts
Powered by: newtelligence dasBlog 1.9.6264.0
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2008, Joseph E. Kaplan
E-mail