NoSpamMgbworld
Thu Jul 21 15:05:01 CDT 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-us/cpref/html/frlrfsystemreflectionassemblyclassimageruntimeversiontopic.asp
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************