C
C Card
I am creating a managed DLL in C++ using VS.NET 2005 and .NET 2.0 that
I hope can be used by applications created for older versions of .NET.
I have a feeling this is not possible, and I hope someone can either
confirm it is not possible or perhaps suggest what I might be doing
wrong that prevents it from working.
The DLL works with an application built using VS.NET 2005 under .NET
2.0 (i.e., when the application and DLL were built with the same
environment).
If I try to build a VB.NET application (which uses the DLL) using the
first (circa 2001) VS.NET version and .NET 1.1, the compiler complains
that the DLL has a bad manifest and that the version is unsupported.
If I try to use the DLL in an application previously built using .NET
1.1, BadImageFormatException is raised when the DLL is loaded.
A Microsoft document titled, "How to: Use an Application Configuration
File to Target a .NET Framework Version" states "You can configure an
application to run on the version on which it was created or on a
later version" (version is referring to .NET version). It also states
that "An application created with the .NET Framework version 2.0 can
target only version 2.0." From my experiments, it would seem that
these statements are also true if "DLL" is substituted for
"application."
C. Card
I hope can be used by applications created for older versions of .NET.
I have a feeling this is not possible, and I hope someone can either
confirm it is not possible or perhaps suggest what I might be doing
wrong that prevents it from working.
The DLL works with an application built using VS.NET 2005 under .NET
2.0 (i.e., when the application and DLL were built with the same
environment).
If I try to build a VB.NET application (which uses the DLL) using the
first (circa 2001) VS.NET version and .NET 1.1, the compiler complains
that the DLL has a bad manifest and that the version is unsupported.
If I try to use the DLL in an application previously built using .NET
1.1, BadImageFormatException is raised when the DLL is loaded.
A Microsoft document titled, "How to: Use an Application Configuration
File to Target a .NET Framework Version" states "You can configure an
application to run on the version on which it was created or on a
later version" (version is referring to .NET version). It also states
that "An application created with the .NET Framework version 2.0 can
target only version 2.0." From my experiments, it would seem that
these statements are also true if "DLL" is substituted for
"application."
C. Card