David said:
How can I build a dll so it runs under both .net 1.1 and .net 2.0
(without requiring a config file)? The dll I have runs fine under
both, so I want it to just work using whatever the exe that calls it
is using.
I assume you have 1.1 and 2.0 installed on the same machine and are
using makefiles. If you use VS.NET to build your assembly then you
should use VS2003 to create the 1.1 version and VS2005 to create the 2.0
version.
If you use a makefile, or just invoke the compiler from the command
line, you just need to change the PATH so that it includes the
appropriate runtime folder so that the correct version of the compiler
is loaded (I also add a path to the SDK folder so that I can use the
other tools). If you pick up the compiler from the right folder it will
make sure that the right version of the framework is used to compile the
assembly. It's not a difficult thing to add to a makefile.
Richard