The GAC determines framework by which compiler was used. If you use the 1.0
compiler, it is 1.0 and is 1.1 if not.
To use an assembly across frameworks, you need a service wrapper. You
cannot, at least without a major fudging, use a 1.1 assembly in a 1.0
project. There are some exceptions to this rule, of course, as 1.0 ASP.NET
assemblies can be dropped in a 1.1 project (if there are no breaking IL
changes - stay away from XML), but they will be treated as 1.1 if you do
this, not 1.0. The GAC is different, however, as it more firmly bonds the CLR
version to the assembly.
To the final quesiton. If you are using 2.0, you will have to stay away from
using any new code that cannot compile to 1.0 ... or, you will have to wrap
your code inside of a service (Remoting or ASMX) and call the service from
your 1.0 code.

Signature
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
> Does anyone know what establishes the framework an assembly will run under?
> For example, when I look at my custom assembly (C# library) in the GAC, the
[quoted text clipped - 22 lines]
>
> Steve
Steve Franks - 09 Jul 2005 11:47 GMT
Thanks. I have some clarifications please.
For this discussion please assume the scenario where I use Visual Studio
2005 beta 2 to compile my assembly. This assembly does NOT use any code,
classes, interfaces, etc that are specific to framework 2.0. In other
words, this same exact code would compile just fine under say the original
VS.NET 1.0. The only difference is that I am compiling it with VS 2005. As
I understand it, at this point the GAC will list it as version 2.x.x.x.
1) Are you saying that if I gave this assembly to someone to use on a
machine that did not have the 2.0 framework installed, that it would not run
without a special wrapper or doing something tricky? What would happen
exactly - an error message?
2) Is there an option within Visual Studio where you tell it what version of
the framework you are targetting? In other words, I'd like to tell VS that
I want my compiled assembly to work with the original 1.0 framework, and
then have it produce an assembly that will run in that ok, and warn me if at
any time I use a class or other function that is not available under my
target framework.
Thanks,
Steve
> The GAC determines framework by which compiler was used. If you use the
> 1.0
[quoted text clipped - 50 lines]
>>
>> Steve