|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
specify clr versionI have a managed library I am using with interop but must use the v1.1
framework. On machines with v2 installed it defaults to that and the component fails. I created an app.config file in the managed project and specified the correct version but it is still using v2. Is there something Im missing here? Are you using the requiredRuntime tag?
http://www.gotdotnet.com/team/changeinfo/ Are you sure 1.1 is available on those machines? If it's required and not available it should throw an exception on startup. -Eric yes, Here is the data from my config file:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <startup> <requiredRuntime version="v1.1.4322"/> <supportedRuntime version="v1.1.4322"/> </startup> </configuration> Show quote "Eric Cadwell" wrote: > Are you using the requiredRuntime tag? > http://www.gotdotnet.com/team/changeinfo/ > > Are you sure 1.1 is available on those machines? If it's required and not > available it should throw an exception on startup. > > -Eric > > > Upon further reading, it appears that you cannot use app.config files with
class libraries. If thats the case then how can I sepcify what version of the runtime is to be used when this library is consumed by a COM application? Show quote "Josh Bernard" wrote: > I have a managed library I am using with interop but must use the v1.1 > framework. On machines with v2 installed it defaults to that and the > component fails. I created an app.config file in the managed project and > specified the correct version but it is still using v2. Is there something Im > missing here? Use exe.config for application that lauches the managed component. The
exe.config can be configured for non managed exe also. Im not sure what you mean. I am using vb6 to call the component, Im not aware
of any config files for vb6 apps. Show quote "Naveen" wrote: > Use exe.config for application that lauches the managed component. The > exe.config can be configured for non managed exe also. > > I think you should try doing it. It works. If you want more info how
this works you should probably read book on Hosting CLR which gives you more insight. do you have links to where I can find info about exe.config because I cannot
find anything about it. Does it get added to the vb6 app? what information goes in it? Show quote "Naveen" wrote: > I think you should try doing it. It works. If you want more info how > this works you should probably read book on Hosting CLR which gives you > more insight. > > Just create an Foo.exe.config (Foo being the application name) and with
in that copy the same thing that you have posted before <?xml version="1.0" encoding="utf-8" ?> <configuration> <startup> <requiredRuntime version="v1.1.4322"/> <supportedRuntime version="v1.1.4322"/> </startup> </configuration> Hello Josh,
For the COM Interoperability CLR starts the latest version of the framework. To specify desired version you need to create the app.config for the unmanaged app, (as Naveen said) it's may sound weird, but when CRL is going to start mscoree.dll looks for the configuration file based on the name of the executable that started the process (as obtained by calling the Microsoft Win32 API GetModuleFileName and apply config to this unmanaged application. JB> I have a managed library I am using with interop but must use the JB> v1.1 framework. On machines with v2 installed it defaults to that JB> and the component fails. I created an app.config file in the managed JB> project and specified the correct version but it is still using v2. JB> Is there something Im missing here? JB> --- WBR, Michael Nemtsev :: blog: http://spaces.msn.com/laflour "At times one remains faithful to a cause only because its opponents do not cease to be insipid." (c) Friedrich Nietzsche thanks! that works nicely. Now the problem I have is that it doesn't work
when I debug the vb6 app. When debugging a vb6 app is the executable placed in a temp directory somewhere? Show quote "Michael Nemtsev" wrote: > Hello Josh, > > For the COM Interoperability CLR starts the latest version of the framework. > To specify desired version you need to create the app.config for the unmanaged > app, (as Naveen said) it's may sound weird, > but when CRL is going to start mscoree.dll looks for the configuration file > based on the name of the executable that started the process (as obtained > by calling the Microsoft Win32 API GetModuleFileName and apply config to > this unmanaged application. > > JB> I have a managed library I am using with interop but must use the > JB> v1.1 framework. On machines with v2 installed it defaults to that > JB> and the component fails. I created an app.config file in the managed > JB> project and specified the correct version but it is still using v2. > JB> Is there something Im missing here? > JB> > --- > WBR, > Michael Nemtsev :: blog: http://spaces.msn.com/laflour > > "At times one remains faithful to a cause only because its opponents do not > cease to be insipid." (c) Friedrich Nietzsche > > > Hello Josh,
I'm not the VB guy and not familiar with VB debugging :), try too search by your filename JB> thanks! that works nicely. Now the problem I have is that it doesn't JB> work when I debug the vb6 app. When debugging a vb6 app is the JB> executable placed in a temp directory somewhere? JB> Show quote JB> "Michael Nemtsev" wrote: Michael Nemtsev :: blog: http://spaces.msn.com/laflourJB> >> Hello Josh, >> >> For the COM Interoperability CLR starts the latest version of the >> framework. >> To specify desired version you need to create the app.config for the >> unmanaged >> app, (as Naveen said) it's may sound weird, >> but when CRL is going to start mscoree.dll looks for the >> configuration file >> based on the name of the executable that started the process (as >> obtained >> by calling the Microsoft Win32 API GetModuleFileName and apply config >> to >> this unmanaged application. >> JB> I have a managed library I am using with interop but must use the >> JB> v1.1 framework. On machines with v2 installed it defaults to that >> JB> and the component fails. I created an app.config file in the >> managed >> JB> project and specified the correct version but it is still using >> v2. >> JB> Is there something Im missing here? >> JB> >> --- >> WBR, >> Michael Nemtsev :: blog: http://spaces.msn.com/laflour >> "At times one remains faithful to a cause only because its opponents >> do not cease to be insipid." (c) Friedrich Nietzsche >> --- WBR, "At times one remains faithful to a cause only because its opponents do not cease to be insipid." (c) Friedrich Nietzsche |
|||||||||||||||||||||||