Framework version question

M

Murray jack

Apollogies if this is in the wrong group

I am looking for a way to compile an assembly in VS2005 under framework 2
and then force it to run under framework 1.1 - is this possible?

I have created a simple console application which returns me the framework
version using the following code
Console.WriteLine("Framework Version: " & Environment.Version.ToString)

when i run this normally i get 2.0.502727 which is all cool and dandy, now
if i edit the config file for this exe and add the following lines

<startup>
<supportedRuntime version="v1.1.4322"/>
</startup>


and run the app, i was hoping it would run under this version, but i get a
system.BadImageFormatException: the format of the file ... is invalid

Thanks for any help you can give me

Murray
 
K

Kevin Spencer

I am looking for a way to compile an assembly in VS2005 under framework 2
and then force it to run under framework 1.1 - is this possible?

No, it's not possible. Framework 2 is a newer version. In order for an
assembly compiled with Framework 1 to support it, Microsoft would have had
to know the programming model of Framework 2 years before it was even built.
Now, Bill Gates is a visionary, but I don't think he's clairvoyant!

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

What You Seek Is What You Get.
 

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