PC Review


Reply
Thread Tools Rate Thread

1.1 -> 1.0 framework side-by-side execution

 
 
Stan
Guest
Posts: n/a
 
      21st Jul 2005
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


 
Reply With Quote
 
 
 
 
Mattias Sjögren
Guest
Posts: n/a
 
      21st Jul 2005
>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

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
 
Reply With Quote
 
Stan
Guest
Posts: n/a
 
      21st Jul 2005
> >I have a weird situation when
> >1.1 assembly is trying to run against 1.0 framework.

>
> Is that an EXE or a DLL?


dll, serviced component

> >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.


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?


 
Reply With Quote
 
=?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
Guest
Posts: n/a
 
      21st Jul 2005
Answers inline:


"Stan" wrote:

> 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/en...rsiontopic.asp

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

***************************
Think Outside the Box!
***************************
 
Reply With Quote
 
Stan
Guest
Posts: n/a
 
      21st Jul 2005
> 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?

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

>
> 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...


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.NET 1.1 and 2.0 side by side execution problems =?Utf-8?B?Tmljaw==?= Microsoft Dot NET 1 27th Jul 2005 07:21 AM
Framework v2.0/v1.1 side by side execution of host IE control =?Utf-8?B?Q29vbHkgTWFydHppYW5v?= Microsoft Dot NET Framework 0 6th Jul 2005 08:28 AM
Very BIG probelm with ASP.NET and Net framework 1.0 and 1.1 running side by side - Please help NWx Microsoft ASP .NET 0 9th Mar 2004 08:54 PM
issue with side by side execution Jason Microsoft Dot NET Framework 2 6th Nov 2003 01:56 AM
Framework 1.0 ad 1.1 running side by side configuration problems? Juan Posadas Microsoft ASP .NET 4 26th Aug 2003 07:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:59 AM.