Jan 15, 2012 at 6:22 PM
Edited Jan 15, 2012 at 6:25 PM
The .NET Framework supports backward compatibility but not forward compatibility. So your .NET 4.0-dependent assembly isn't going to run in a .NET 3.5 application like NodeXL.
The long-term fix for this problem, which hasn’t arisen until now, is for us to port our entire solution to Visual Studio 2010 and .NET 4.0. We haven’t done that yet, for three reasons:
1. It will lock out developers who are still using Visual Studio 2008. This becomes less important as time passes.
2. The solution's multiple projects will need to be thoroughly tested, and in particular I anticipate problems with NodeXL’s setup program. The setup has always caused me huge headaches, and I will be shocked if it ports over without causing more of
3. It will require a big download of .NET 4.0 on target machines that don’t already have it.
Until we bite the bullet and port the solution, here is one workaround you might consider:
A. Implement a .NET 4.0 command-line executable that gets your data and formats it as GraphML. Have it accept command-line arguments that specify the data to get, and have it write the GraphML results to a known file location. (The file location can be specified
as one of the arguments.)
B. Implement your IGraphDataProvider as a .NET 3.5 assembly that can be loaded by NodeXL. It would be nothing but a very thin wrapper that makes a Process.Start() call to your executable, then loads the resulting GraphML file and passes the XML document
back to NodeXL.
It’s a small bit of a kludge, but it should work just fine. And when we port NodeXL, you can always refactor your importer into a single .NET 4.0 assembly, like other importers. If you structure your code so the bulk of it is in a class that knows
nothing about where it’s being called from, the refactoring should be easy.
One warning: The current NodeXL setup program checks for the existence of .NET 3.5 and installs it if necessary. It will not check for .NET 4.0, so you are on your own for that requirement.
That’s the best I can offer right now.