1.1 -> 1.0 framework side-by-side execution

  • Thread starter Thread starter Stan
  • Start date Start date
S

Stan

Hi,

I understand how side-by-side should work - it both 1.0 and 1.1 frameworks
are installed, 1.1 assembly should run against 1.1 framework and 1.0
assembly should run agains 1.0.

This is what I don't clearly understand:

1. Mixing 1.1 and 1.0 assemblies
I have 25 assemblies three of them are 1.1.
What happens if 1.0 assembly calls 1.1? I have a weird situation when
1.1 assembly is trying to run against 1.0 framework.

2. Service components
If 1.0 assembly is installed in COM+ catalog and I recompile it to 1.1,
should I drop and re-register this assembly with regsvcs?

3. GAC
If 1.0 assembly was in the GAC and I recompile it to 1.1, should I
install this assembly into both 1.0 and 1.1 GACs or only into 1.1?

4. How can I find what framework an assembly is compiled against?


Thanks!

-Stan
 
1. Mixing 1.1 and 1.0 assemblies
I have 25 assemblies three of them are 1.1.
What happens if 1.0 assembly calls 1.1?

Assuming you're running with with the v1.1 runtime loaded, it should
hopefully just work.

I have a weird situation when
1.1 assembly is trying to run against 1.0 framework.

Is that an EXE or a DLL?

2. Service components
If 1.0 assembly is installed in COM+ catalog and I recompile it to 1.1,
should I drop and re-register this assembly with regsvcs?

Not sure if it's absolutely necessary, but it wouldn't hurt.

3. GAC
If 1.0 assembly was in the GAC and I recompile it to 1.1, should I
install this assembly into both 1.0 and 1.1 GACs or only into 1.1?

There's only a single GAC shared by both versions.

4. How can I find what framework an assembly is compiled against?

Programmatically, you can check the Assembly.ImageRuntimeVersion
property.



Mattias
 
I have a weird situation when
Is that an EXE or a DLL?

dll, serviced component
There's only a single GAC shared by both versions.

I didn't know that, thanks

Wouldn't be better just to unstall 1.0 framework then trying to solve these
side-by-side issues?
 
Answers inline:


Stan said:
Hi,

I understand how side-by-side should work - it both 1.0 and 1.1 frameworks
are installed, 1.1 assembly should run against 1.1 framework and 1.0
assembly should run agains 1.0.

This is what I don't clearly understand:

1. Mixing 1.1 and 1.0 assemblies
I have 25 assemblies three of them are 1.1.
What happens if 1.0 assembly calls 1.1? I have a weird situation when
1.1 assembly is trying to run against 1.0 framework.

I feel far more fuzzy about a 1.0 assembly under 1.1 than the other way
around. Same with a 1.x under 2.0. The exception is heavy XML 1.0 assemblies,
as much was broken in 1.1 (for very good reasons).
2. Service components
If 1.0 assembly is installed in COM+ catalog and I recompile it to 1.1,
should I drop and re-register this assembly with regsvcs?

I would venture a guess that a new GUID would be generated when recompiling
under a different version. If so, it depends on how much you like to gamble.
As long as the new GUID is larger, you should not have a problem. But, if the
new GUID is smaller, you can end up with COM+ attempting to find the old
assembly and never finding it.

WIth COM+, if you change things, it is safer to drop them from the
application (COM+ application, that is) so the GUID is removed. Then,
recompile and place into COM+ once again.
3. GAC
If 1.0 assembly was in the GAC and I recompile it to 1.1, should I
install this assembly into both 1.0 and 1.1 GACs or only into 1.1?

When you install into the GAC, the version is stored by unique identifier,
compiled version, culture and something else that my feeble mind has
forgotten. The GAC is basically a file directory, for lack of a better
analogy, so there is not a separate GAC for each version, although there are
separate gacutil.exe executables in the different framework directory.
4. How can I find what framework an assembly is compiled against?

Programatically? The Assembly class has ImageRuntimeVersion
(System.Reflection).

http://msdn.microsoft.com/library/e...tionassemblyclassimageruntimeversiontopic.asp

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
I feel far more fuzzy about a 1.0 assembly under 1.1 than the other way
around. Same with a 1.x under 2.0. The exception is heavy XML 1.0 assemblies,
as much was broken in 1.1 (for very good reasons).

Here is my problem. I got about 2.5 1.0 dlls running on the production
server. I am looking for the best way to replace them to 1.1. Should I

a) keep both 1.0 and 1.1 frameworks and replace them one by one

or

b) uninstall 1.0, install 1.1, recompile all dlls, replace and
forget about them?
Programatically? The Assembly class has ImageRuntimeVersion
(System.Reflection).

Is there any command line tool? It will probably take me 5 min to write one
once I know this API function, but maybe somebody has already done it...
 
Back
Top