I’m a little disappointed, considering that the dynamic typing available in C#4 could really make developing with ESRI COM objects a lot more interesting, and hopefully, easier. I just tried to set it up with a no-go. When I launch an ESRI component set to go against .NET 4 framework, I get the dreaded: “the type initializer for [Insert Class here] threw an exception”.
This brings up an interesting few issues. First off, the current SDK does not support Visual Studio 2010, which, honestly, is no great loss as the SDK is simply an “OK” guide for me at this point. Worst case, I open an individual project back up in VS2008. Which, actually, I need to do occasionally as the ESRI.ArcGIS assemblies (which, to my knowledge are still there – I can still see them registered in the GAC if I navigate to C:\Windows\assembly) are not visible via Visual Studio 2010.
The news gets uglier. I thought maybe when/if we could figure out how to get ESRI components working against .NET 4, we could move to deployments utilizing the .NET 4 Client Profile. HOWEVER, that looks like it may be completely impossible as ESRI.ArcGIS.ADF, required for registering your external commands and toolbars (http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/bdb9dce6-923c-4262-82f5-a84e44bc7877.htm), relies on System.Web – which is not part of the Client Profile. Oh ESRI, get your act together. This dependency seems foolish – especially with the myriad of other choices available via WPF or WinForms.
In the meantime I’ll continue my development using .NET 3.5 – limited to implicit typing at best, which, makes the syntax a little nicer I will admit – but it’s not quite to the point where I’d like to get with the dynamic types. One alternative I’ve considered is moving to IronPython, but with C#4 released, I’d rather wait – though waiting for ESRI could take a while…