PC Review


Reply
Thread Tools Rate Thread

Calling 2.0 from 1.1

 
 
Abhishek
Guest
Posts: n/a
 
      9th Feb 2005
I've both version 2.0 Beta and 1.1 of dotnet framework installed on my
system.

I've an assembly which is built on version 1.1 and loads an assembly
dynamically reading the location of assembly from the config file. This
assembly works fine when config file asks to load an assembly which is
built on 1.1 framework but now i've to load an assembly which is made
on 2.0 Beta. When i try to give the path of such an assembly the Loader
throws a BadImageFormatException which is genuine exception b'coz it
can't load such an assembly which is targeted for a different runtime.
My question is that is there someway to ask .NET framework to do this
for me may be something like framework 1.1 asks framework 2.0 beta to
load the assembly in its runtime and do the job for me .

Any inputs will help

Thanks in advance
Abhishek

 
Reply With Quote
 
 
 
 
Mattias Sjögren
Guest
Posts: n/a
 
      9th Feb 2005
>My question is that is there someway to ask .NET framework to do this
>for me


Do what exactly?


>may be something like framework 1.1 asks framework 2.0 beta to
>load the assembly in its runtime and do the job for me .


There can only be one version of the CLR loaded in your process. The
only way to use a v2.0 assembly is to run the application with the
v2.0 CLR.



Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
 
Reply With Quote
 
NuTcAsE
Guest
Posts: n/a
 
      9th Feb 2005
You can try adding the following configuration section to you
app.config file:


<startup>
<requiredRuntime version="[VersionNo]" safemode="true"/>
</startup>

In place of [VersionNo], enter the exact version of your 2.0 framework.
You can get that be looking at the
%WINDIR%\Microsoft.NET\Framework folder and getting the version no of
the 2.0 framework. This will only work if your sure your 1.1 assembly
will run under 2.0 which should be for most of the cases since 1.1 apps
are portable to 2.0.

Hope this helps.

NuTcAsE

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling SQL from code has different behaviour than calling it from MS SQL Server Management Studio jeeji Microsoft C# .NET 1 29th Jun 2006 10:43 AM
Calling DoCmd.RunCommand acCmdSaveRecord, after calling an API function Savvoulidis Iordanis Microsoft Access Form Coding 2 19th Mar 2005 06:34 PM
Fail to send fax when making international fax calling / calling c =?Utf-8?B?c2Ftd2lzZQ==?= Windows XP Help 1 28th Dec 2004 02:31 PM
Calling FormsAuthentication.SignOut() after calling Response.Flush =?Utf-8?B?TWFydGluIExlZQ==?= Microsoft ASP .NET 1 28th Sep 2004 01:47 PM
Server Side button calling page_load before calling it's own click event. Ryan Ternier Microsoft ASP .NET 4 29th Jul 2004 02:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:14 PM.