Rhubarb
Rhubarb

Reputation: 4003

Can a .NET app that was built against 1.1 be guaranteed to run on any machine with newer versions of .NET?

My new Windows 7 machine for instance doesn't appear to have a .NET installation folder with 1.1 assemblies. Will an app built and targeting 1.1 run without modify this machine with an older distribution of .NET?

Upvotes: 2

Views: 188

Answers (5)

Captain Sensible
Captain Sensible

Reputation: 5037

You will NOT have to install the old runtime. Add the following XML element to the app config file:

<Configuration>
<startup>
<supportedRuntime version="v2.0.0.0" />
</startup>
</configuration>

Note that version should correspond to whatever the version number is of the installed runtime.

Upvotes: 3

GordonBy
GordonBy

Reputation: 3407

Suck it and see.

Previously i experienced the situation whereby a 1.1 winforms exe had problems when the user had a screen setup with a high DPI.

The problem was in v1.1 of the framework, and the solution was to uninstall v1.1 of the framework and ensure v2.0 was on the box.

The app would work without issue.
This workaround was used on about 10 of our clients machines over the years.

Upvotes: 1

Greg
Greg

Reputation: 2229

You cannot get any guarantee that your app will run as intended on new versions of .NET. You can specify the .NET version to run in the app.config if I remember correctly. You will have to install .NET 1.1 and tell the program to run using the 1.1 engine.

Upvotes: 2

ntziolis
ntziolis

Reputation: 10231

No. You will need to install .NET 1.1.

Upvotes: 0

Justin Niessner
Justin Niessner

Reputation: 245479

No. You'll need to install .NET 1.1 to run the older application.

Upvotes: 2

Related Questions