Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2005

Tip: Looking for answers? Try searching our database.

1.1 -> 1.0 framework side-by-side execution

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stan - 21 Jul 2005 19:51 GMT
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
Mattias Sjögren - 21 Jul 2005 20:25 GMT
>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

Signature

Mattias Sjögren [MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Stan - 21 Jul 2005 20:55 GMT
> >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?
Cowboy (Gregory A. Beamer) - MVP - 21 Jul 2005 21:05 GMT
Answers inline:

> Hi,
>
[quoted text clipped - 8 lines]
>     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-us/cpref/html/frlrfsystemreflectionassembly
classimageruntimeversiontopic.asp


Signature

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

***************************
Think Outside the Box!
***************************

Stan - 21 Jul 2005 21:21 GMT
> 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...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.