|
Prev: Where is urn:schemas-microsoft-com:asm.v1?
Next: appSettings causes HTTP Error 500.19 - Internal Server Error
From: Scott M. on 13 Jul 2008 17:41 When attempting to target a specific version of the .NET Framework in my application configuration file, I get an error saying that: "To run this application, you must first install one of the following versions of the.NET framework:..." and then it lists the version that I targetted in my config file. I am building this with VS 2008 and the 3.5 framework, but am not using or referencing any assemblies that are specific to 3.5 - just a very basic class library project. I DO have all the prior versions of the framework installed (including the one I'm targetting in my config file). What do you think?
From: Jeroen Mostert on 13 Jul 2008 18:00 Scott M. wrote: > When attempting to target a specific version of the .NET Framework in my > application configuration file, I get an error saying that: "To run this > application, you must first install one of the following versions of the.NET > framework:..." and then it lists the version that I targetted in my config > file. > > I am building this with VS 2008 and the 3.5 framework, but am not using or > referencing any assemblies that are specific to 3.5 - just a very basic > class library project. > > I DO have all the prior versions of the framework installed (including the > one I'm targetting in my config file). > > What do you think? > I think you've neglected to give us the most important bit of information needed to diagnose the problem, which is the actual configuration file. As far as I know you can't target specific frameworks at all. You can only target specific runtimes, which is not the same thing. A runtime version is something along the lines of "v2.0.50727" for .NET 2.0. Under normal circumstances, it simply isn't necessary to specify a runtime version. This should only be used if your application has compatibility issues that prevent it from being run by a later runtime than the one it was written for. If you're using VS 2008, you cannot be developing a .NET 1.x application, so this probably doesn't apply. If you want to ensure your 3.5 or 3.0 application will run on a 2.0 configuration, simply remove any references to 3.0 or 3.5 assemblies. The runtime is the same for the 2.0, 3.0 and 3.5 frameworks. Well, almost -- ..NET 3.5 will install the 2.0 SP1 runtime, but this is different only in build number. -- J.
From: Scott M. on 13 Jul 2008 19:07 "Jeroen Mostert" <jmostert(a)xs4all.nl> wrote in message news:487a7af6$0$14355$e4fe514c(a)news.xs4all.nl... > Scott M. wrote: >> When attempting to target a specific version of the .NET Framework in my >> application configuration file, I get an error saying that: "To run this >> application, you must first install one of the following versions of >> the.NET framework:..." and then it lists the version that I targetted in >> my config file. >> >> I am building this with VS 2008 and the 3.5 framework, but am not using >> or referencing any assemblies that are specific to 3.5 - just a very >> basic class library project. >> >> I DO have all the prior versions of the framework installed (including >> the one I'm targetting in my config file). >> >> What do you think? > I think you've neglected to give us the most important bit of information > needed to diagnose the problem, which is the actual configuration file. > > As far as I know you can't target specific frameworks at all. You can only > target specific runtimes, which is not the same thing. A runtime version > is something along the lines of "v2.0.50727" for .NET 2.0. <startup> <requiredRuntime version="2.0.50727" safemode="true" /> </startup> > > Under normal circumstances, it simply isn't necessary to specify a runtime > version. This should only be used if your application has compatibility > issues that prevent it from being run by a later runtime than the one it > was written for. If you're using VS 2008, you cannot be developing a .NET > 1.x application, so this probably doesn't apply. > > If you want to ensure your 3.5 or 3.0 application will run on a 2.0 > configuration, simply remove any references to 3.0 or 3.5 assemblies. The > runtime is the same for the 2.0, 3.0 and 3.5 frameworks. Well, almost -- > .NET 3.5 will install the 2.0 SP1 runtime, but this is different only in > build number. I understand, but I need to be able to demonstrate the behavior nonetheless. > > -- > J.
From: Jeroen Mostert on 13 Jul 2008 19:18 Scott M. wrote: > "Jeroen Mostert" <jmostert(a)xs4all.nl> wrote in message > news:487a7af6$0$14355$e4fe514c(a)news.xs4all.nl... >> Scott M. wrote: >>> When attempting to target a specific version of the .NET Framework in my >>> application configuration file, I get an error saying that: "To run this >>> application, you must first install one of the following versions of >>> the.NET framework:..." and then it lists the version that I targetted in >>> my config file. >>> >>> I am building this with VS 2008 and the 3.5 framework, but am not using >>> or referencing any assemblies that are specific to 3.5 - just a very >>> basic class library project. >>> >>> I DO have all the prior versions of the framework installed (including >>> the one I'm targetting in my config file). >>> >>> What do you think? >> I think you've neglected to give us the most important bit of information >> needed to diagnose the problem, which is the actual configuration file. >> >> As far as I know you can't target specific frameworks at all. You can only >> target specific runtimes, which is not the same thing. A runtime version >> is something along the lines of "v2.0.50727" for .NET 2.0. > > <startup> > <requiredRuntime version="2.0.50727" safemode="true" /> > </startup> > That's wrong in two ways: only 1.0 applications should use <requiredRuntime>, later versions must use <supportedRuntime>. Second, the version number (name, actually) has to match a directory name in %WINDIR%\Microsoft.NET\Framework *exactly*. So make it <startup> <supportedRuntime version="v2.0.50727" /> </startup> -- J.
From: Scott M. on 13 Jul 2008 19:34 Ok thanks. I was actually using the code from Professional Visual Basic 2008, page 968-969 and they show it with those two incorrect items. Is there a way to verify the runtime version that is currently running the assembly? Something in System.Reflection? "Jeroen Mostert" <jmostert(a)xs4all.nl> wrote in message news:487a8d55$0$14354$e4fe514c(a)news.xs4all.nl... > Scott M. wrote: >> "Jeroen Mostert" <jmostert(a)xs4all.nl> wrote in message >> news:487a7af6$0$14355$e4fe514c(a)news.xs4all.nl... >>> Scott M. wrote: >>>> When attempting to target a specific version of the .NET Framework in >>>> my application configuration file, I get an error saying that: "To run >>>> this application, you must first install one of the following versions >>>> of the.NET framework:..." and then it lists the version that I >>>> targetted in my config file. >>>> >>>> I am building this with VS 2008 and the 3.5 framework, but am not using >>>> or referencing any assemblies that are specific to 3.5 - just a very >>>> basic class library project. >>>> >>>> I DO have all the prior versions of the framework installed (including >>>> the one I'm targetting in my config file). >>>> >>>> What do you think? >>> I think you've neglected to give us the most important bit of >>> information needed to diagnose the problem, which is the actual >>> configuration file. >>> >>> As far as I know you can't target specific frameworks at all. You can >>> only target specific runtimes, which is not the same thing. A runtime >>> version is something along the lines of "v2.0.50727" for .NET 2.0. >> >> <startup> >> <requiredRuntime version="2.0.50727" safemode="true" /> >> </startup> >> > That's wrong in two ways: only 1.0 applications should use > <requiredRuntime>, later versions must use <supportedRuntime>. Second, the > version number (name, actually) has to match a directory name in > %WINDIR%\Microsoft.NET\Framework *exactly*. So make it > > <startup> > <supportedRuntime version="v2.0.50727" /> > </startup> > > -- > J.
|
Next
|
Last
Pages: 1 2 Prev: Where is urn:schemas-microsoft-com:asm.v1? Next: appSettings causes HTTP Error 500.19 - Internal Server Error |