Targeting .NET 1.0

  • Thread starter Thread starter Todd Brown
  • Start date Start date
T

Todd Brown

I'm building a .NET application that I want to be as compatible as
possible. Hence, I want to target .NET 1.0. I followed the
instructions in the VS online documentation which basically consisted of
creating this configuration file:

<?xml version ="1.0"?>
<configuration>
<startup>
<supportedRuntime version="v1.0.3705" />
</startup>
<runtime>
<assemblyBinding ...appliesTo="v1.0.3705">
<dependentAssembly>
<assemblyIdentity .../>
<bindingRedirect oldVersion="..." newVersion="1.0.3300.0"/>
</dependentAssembly>
...

However, it didn't work. I added this configuration file both to my
project and the associated setup project. The setup says that .NET
1.1.4322 is required.

Do I need to tell my project to *use* this configuration file somehow?
Do I need to do something different for the setup project? Please help!

-- Todd Brown
 
Update: I've successfully managed to make the application work against
..NET 1.0 using the configuration file shown below, but I'm still having
trouble with the installer. I create the installer then, after the
fact, change the SupportedRuntime list in the Setup.Ini file, but that
doesn't work (I suspect because the MSI still knows what version it's
targeting.) Does anyone know how to configure the Setup project so that
it targets the correct version(s) of .NET?

-- T
 
I've managed to solve my problem, and I thought I'd share my solution in
case it helps someone else.

Apparantly, it's possible but not advisable to build against .NET 1.0
with VS 2003. If you really need to build against .NET 1.0, use VS
2002, which can be installed alongside VS 2003.

However, you can specify that your .NET 1.1 application will also work
with .NET 1.0 (the inherent danger here, of course, is that you're using
a feature unique to .NET 1.1). To do this, go to the project's property
pages (Project->Properties). Under "Common Properties" and then
"General", in the "Application" section is a property called "Supported
Runtimes". To target 1.0, click on the property and then click the
"..." button. You'll be allowed to specify 1.1, 1.0, or both. The
result of this is that it modifies the configuration file
(project.config) for the project along the lines specified in my last post.

The last piece of the puzzle is configuring your Setup Project so that
it'll run if the client computer only has 1.0 installed. Right-click on
your setup project in the Solution Explorer, select View->Launch
conditions. You'll see Launch Conditions and under that, .NET
Framework. If you click on .NET Framework, the property page for that
will contain a property "SupportedRuntimes"; add 1.0.3705, separated by
a semicolon.

Then you'll be good to go.
 
Back
Top