|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Framework version questionI 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 > I am looking for a way to compile an assembly in VS2005 under framework 2 No, it's not possible. Framework 2 is a newer version. In order for an > and then force it to run under framework 1.1 - is this possible? 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! -- Show quoteHTH, Kevin Spencer Microsoft MVP Professional Chicken Salad Alchemist What You Seek Is What You Get. "Murray jack" <murrayj***@performa.co.uk> wrote in message news:uPbqeklqGHA.4192@TK2MSFTNGP04.phx.gbl... > 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 > > > > > > > |
|||||||||||||||||||||||