Framework 1.0 application looking for 1.1 dll

  • Thread starter Thread starter Dan B
  • Start date Start date
D

Dan B

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
 
Thanks Amit,

The references you included prompted me to take a look at my config
file. As you suspected it only had 1.1 runtime as an option. Which is
curious since I thought 1.1 was uninstalled on my development machine.
You also suggested that I upgrade to 1.1. I am a bit confused. Since I
have VB Dot Net 2002 version I thought it would only work with 1.0 Maybe
you were suggesting that I upgrade to VB Dot 2003 in order to use 1.1 Or is
there a way to incorporate VB 2002 and 1.1 together?
Thanks for you assistance.

Dan

Amit Bahree said:
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 said:
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
 
Back
Top