>>>Can I reference the same DLL in both VS2005 and VS2008?
>>
>>Yes as long as the runtime version that you compiled against matches or at least is backwards compatible with the linked application. So a .NET 3.5 application can always link to .NET 2.x runtime application, but vice versa may not work.
>
>Are you sure that's true? I haven't tried it but if *both* versions of the framework are available then why would a .NET 1 app not be able to use a NET 3.5 assembly (assuming.of course, that the .Net 3.5 public interface didn't expose types that were not available in .NET 1) ?
The byte code is the same in all versions of .NET and there's no hard link to any version unless you explicitly set that up in a manifest file so in theory you can run any version of the framework against any assembly assuming you're using only the features of the lower version.
The problem with forward compatibility arises when other assemblies are referenced from ANY code that is used that aren't available in the lower version.
+++ Rick ---
>Update: I see that you said 'may not work' so......
>
> A .NET 2.0 application can also use a .NET 3.5 compiled assembly because .NET 3.5 is really .NET 2.0 plus libraries (more assemblies) as long as the code referenced by the 2.0 app doesn't use 3.5 features the 3.5 compiled assembly can be called from 2.0.
>>
>>.NET 4.0 will introduce a whole new runtime version, but it's still backwards compatible with 2.0 so no matter what referencing old assemblies should always work regardless of runtime version.
>>
>>Hope this helps,
>>
>>+++ Rick ---