Re: Framework 1.0 application looking for 1.1 dll

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Amit Bahree (amit_at_NOSPAMthepentagon.com)
Date: 01/05/05


Date: Wed, 05 Jan 2005 23:02:45 +0000
To: Dan B <agentkc@kc.rr.com>

Dan,
Seems like you compiled against the v1.1 as opposed to v1.0 of the
framework. There are many reasons for upgrading to v1.1 (such as loads
of bug-fixes). Lets, assume installing v1.1 is not an option or some
reason you want to run it on v1.0, the easiest option is to create a
config file and point it to the right version.

Remember for an unconfigured windows app (i.e. apps that do not carry a
configuration file or at least the supportedRuntime element in their
configuration files) execute with the version of the Framework that was
used to build the application, provided that version of the Framework is
installed on the local system. (The version of the Framework with which
the application was built is contained in the header of the application
.exe file.) When that version of the Framework is not available, the CLR
uses a later version of the Framework in its place. In other words, an
unconfigured application built with Framework 1.0 executes with 1.0 on a
system that has both 1.0 and 1.1 installed. That same application
executes with the 1.1 Framework on a system with only the 1.1 Framework
installed. It is strongly recommended that applications be configured to
support all versions of the Framework that are considered compatible, to
provide for scenarios where one particular version may be available on
the target machine.

You can fix this two ways, one as mentioned earlier install v1.1 of the
framework. Two create the correct app config file (e.g. below).
<configuration>
        <startup>
                    <supportedRuntime version="v1.1.4322" />
                    <supportedRuntime version="v1.0.3705" />
        </startup>
</configuration>

I would recommend reading the Side-by-Side Execution model[1] of .NET.

hth,
Amit.
www.desigeek.com

[1] - http://tinyurl.com/3xtbd

Dan B wrote:
> I wrote a windows application in VB Dot Net 2002. So that's Framework 1.0
> right?
>
> It ran fine on several computers but then I tweaked it and rebuilt it and
> now I have the following exception when the application starts
>
> C:\Windows\Microsoft.Net\Framework\v1.1.4322\mscorwks.dll could not be
> loaded.
>
> The thing is on my development computer it does not give me the error. But
> maybe the reason for is that at one time I had both 1.0 and 1.1 installed on
> the development box.
>
> I've looked through the dependencies and can't find any components that
> needing anything from Framework 1.1 .
>
> Help ! Anybody got any ideas?
>
> Dan
>
>



Relevant Pages

  • Re: Best practices question
    ... why would they be averse to installing the 2.0 framework on their SE ... > I can see the 98SE owners being resistant to change for obvious reasons? ...
    (microsoft.public.dotnet.languages.vb)
  • RE: .net framework version, visual studio 03
    ... You can use a config file to direct the runtime to use a particular version ... framework using an older version of VB.net, ... I think you only have to switch one reference for each project, ... When compiling the release, I did the switch. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: .Net Framework 2.0
    ... standalone application using a Config file works very well and that will ... may be other applications running in the host process so you couldn't just ... override the use of the .NET framework. ... > version of the CLR is loaded to work around the behavioral differences. ...
    (microsoft.public.dotnet.framework.clr)
  • RE: App.Config: using doctype and entity blocks
    ... Block Framework, ... Framework for the manipulation of the App.Config is included as part of the ... fuslogvw reports that the XML config file is not formatted correctly. ...
    (microsoft.public.dotnet.general)
  • Re: Latest patch parses 1.1 pages with 2.0
    ... It reports 1.1. ... The properties for the root site in the MMC plugin show the .Net version as ... Version Information: Microsoft .NET Framework Version:2.0.50727.832; ... Now I could fix the config file to run happily under 2.0, ...
    (microsoft.public.dotnet.framework.aspnet)