Performance hit running 1.1 assembly in 2.0?

S

Steve Franks

I have a web site built using ASP.NET 2.0 and Visual Studio 2005. If also
have a C# assembly that was compiled using VS 2003, so this assembly runs
under the 1.1 framework.

If I use this assembly built for the 1.1 framework within my web app that
uses the 2.0 framework, is there any performance penalty incurred here? In
other words, am I creating some sort of "cross boundary" communication that
has to occur between the 2.0 framework and 1.1 framework? Or is there no
performance penalty and just a matter of the 1.1 code not having access to
specific features of the 2.0 framework.

The dilemma I have is that I have to redistribute to developers my C# class
library. Some developers are building ASP.NET 2.0 apps, while others are
using 1.1. I do NOT want to wind up creating separate installations, one
that has my 2.0 compiled assembly and another that has my 1.1 compiled
assembly.

I could do this within one installer package and dynamically determine the
..NET framework and install the appropriate version of my assembly
accordingly. However even this approach has major problems. Specifically,
I could easily see how someone would install on a ASP.NET 2.0 machine, and
then wind up transferring my assembly DLL to another machine that only had
the 1.1 framework which from what I understand would break things. Or
likewise they may install on 1.1 and then transfer the DLL to a 2.0 machine
and never realize the assembly was really running under the 1.1 framework on
that machine despite their app using 2.0.

What is a developer to do?

Steve
 
G

Guest

The 1.1 assembly will run as if it is a 2.0 assembly when loaded. As long as
it does not hit a breaking change (and they promised us last year there would
be none ;->), you are fine.

Short answer: As long as it runs, it will run faster.


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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top