Good news, early adopters! ImageMan.Net Twain 2.80, the latest release of our advanced Twain component, fully supports the .NET framework 4.0 and Visual Studio 2010. This component is now available for downloading from the My Products page.
ImageMan.Net Twain 2.80 ships with two separate DLL's- one for the .NET framework 2.0 and one for the .NET framework 4.0. You'll find the DLL's in separate folders in the installation path.
Note: You can tell the difference between the similarly named DLLs by right clicking on the file and viewing the Properties dialog. In the Details tab (for Windows 7) or the Version tab (for XP), view the File description field. The 2.0 assembly will read "ImageMan.Net Twain for .Net 2.0". Likewise, the 4.0 assembly will be labeled "ImageMan.Net Twain for .Net 4.0".
Sample Applications and Code
You'll notice new client side and ASP.NET samples (and sample code) that are fully compatible with Visual Studio 2010. If you have multiple versions of Visual Studio on your system, you can select which samples to install during the installation process.
Note: The Start menu links to the demo apps will always target the earliest version of the .NET framework you have installed on your computer.
To better integrate with Visual Studio 2010, we've updated our documentation to the Microsoft Help System format which is available to you when you install Visual Studio 2010. Previous versions still retain their properly formatted help documentation.
With the release of Visual Studio 2010, some of you are probably eager to start developing new applications on (or porting existing applications to) the .NET Framework 4 and the new IDE. You can use ImageMan.Net components in Visual Studio 2010 projects that target .Net Framework 4 but you'll need to be aware of one issue.
According to Microsoft:
The .NET Framework 4 works side-by-side with older Framework versions. Applications that are based on older versions of the Framework will continue to run on the version targeted by default.
However, the above statement does not hold true when the older versions involve mixed mode assemblies. ImageMan.Net was developed on .NET Framework 2 and one of the components, DTI.ImageMan.Codecs.dll, is a mixed-mode assembly which does not get properly loaded into the .NET Framework 4 runtime without additional configuration.
Until the ImageMan.Net source is built in .NET Framework 4, you are going to have to apply a slight workaround to get the components to work properly in a .NET Framework 4 assembly. Here's an example of the type of exception you can expect to see when you do not apply this workaround:
To cause this exception, I created a simple Windows application in Visual Studio 2010. I dropped ImageMan.Net ThumbnailViewer, Viewer, Annotation and AnnotationToolSrip controls onto the form's design surface. Then I built and ran the application which displayed the exception dialog above.
To fix this problem, you'll simply need to add the useLegacyV2RuntimeActivationPolicy attribute to the application's config file (app.config) like so:
Setting this attribute to true will allow a pre-.NET Framework 4 mixed-mode assembly to load in a .NET Framework 4 process. With this workaround in place, you'll be able to integrate the ImageMan.Net components in your Visual Studio/.NET Framework 4 projects. We will soon release .NET Framework 4 targeted ImageMan.Net assemblies which will not require you to modify your app.config files.