Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / January 2005

Tip: Looking for answers? Try searching our database.

How do I get a .NET 1.1 app to run on .NET 2.0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Thielen - 05 Jan 2005 14:19 GMT
Hi;

We just had a user who has .NET 2.0 installed, but not .NET 1.1. How can we
set our .NET 1.1 app so it will run in a 2.0 only environment?

As I understand it, the startup Element in the application configuration
file contains two elements : required runtime and supported runtime.

However, in my case I am writing a dll that is an add-on to Word. So the
config file is for the application, winword.exe.config and I cannot create
that file as Word is Microsoft's app, not mine.

Is there a way to mark a dll as runnable under .NET 1.1 or later?

Signature

thanks - dave

"Peter Huang" [MSFT] - 06 Jan 2005 07:53 GMT
Hi

Here is a link you may take a look.
HowTo: Control which version of the framework your .NET office add-ins run
under
http://dotnetjunkies.com/WebLog/josephcooney/archive/2004/08/15/22099.aspx

Best regards,

Perter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

David Thielen - 06 Jan 2005 17:37 GMT
Hi;

I thought of that approach. But what if someone installs two word add-ins, I
create a winword.exe.config saying use .NET 1.1 and the other add-in needs
.NET 2.0. Then when I install second, I have just broken the other add-in.

I was hoping there was a way to set this for just my add-in without changing
things for other add-ins?

thanks - dave

> Hi
>
[quoted text clipped - 10 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.
Fredrik Wahlgren - 06 Jan 2005 17:57 GMT
> Hi;
>
[quoted text clipped - 6 lines]
>
> thanks - dave

I think that DllHell 2.0 happens in this case. I really don't think it's a
good idea to make .NET code that runs on more than one version of .NET. What
is the actual problem? Are the users too lazy to download the proper .NET
version? Is there a policy among potential buyers not to use a particular
.NET version? Are they too cheap to buy a new disk?

Maybe I'm missing something but I would really like to know why you want to
do this.

/Fredrik
David Thielen - 06 Jan 2005 21:37 GMT
Hi;

You would be surprised how difficult it is to get software installed at
large companies. Basically it doesn't happen unless IT decides it's worth
rolling out to everyone.

My worry is that within a year there will be companies that are .NET 2.0
only while others are .NET 1.1 only. That will be bad in this case.

thanks - dave

> > Hi;
> >
[quoted text clipped - 19 lines]
>
> /Fredrik
Fredrik Wahlgren - 06 Jan 2005 21:58 GMT
> Hi;
>
[quoted text clipped - 6 lines]
>
> thanks - dave

I have to admit that I have had some experience with large companies. I
think your best option is to have one project with as many solutions as you
want to target and then let your installation program decide what to
install. I seriously belive that if you create a dll that can work with any
version of .NET, you will end up creating far more problems than you solve.

If you do, you must examine your entire code whenever there's a new version
of .NET. What happens if you have portions of code that work with one
version of .NEt but not with another since the methods now take new
paramaters or have changed in some other way?  You would need to use if
statements all over the code to make sure the right one executes depending
on what version of .NET your program chose to work with. How can you make
sure you have tested every line of code for compliance? What a mess!

/Fredrik
"Peter Huang" [MSFT] - 07 Jan 2005 06:13 GMT
Hi,

I do not think it is a good practice to run two version CLR in one process.
So far the supportedruntime is exe based setting, that is to say in one exe
we load one version CLR, we can not set it for dll based. And that is why
we provide the config file for winword.exe.config while not the
dllname.config.

Hope this helps.
Usually the app will load the most recently framework, so it is better to
deploy the app for the most recently version unless we did not have the new
one. Also you may try Fredrik's suggestion.

Best regards,

Perter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

David Thielen - 10 Jan 2005 22:45 GMT
For a .NET exe I agree. Writing a Word Add-In in .NET is a weird case where
each Add-In could use a different version of .NET and shouldn't conflict as
the .exe is not .NET.

I don't want to build a .NET 2.0 version of each Add-In because we already
have to build a different Add-In for each version of Word so that would take
us from 3 to 6 programs. So I guess we will just tell them they must install
.NET 1.1.

thanks - dave

> Hi,
>
[quoted text clipped - 16 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" [MSFT] - 11 Jan 2005 03:43 GMT
Hi

I think commonly one process can only lauch clr(i.e. 1.1 or 2.0) which we
can consider it as the low level virtual machine to run the MSIL code,
although we can lauch multiple AppDomains which every one use different
version Assembly.

Winword.exe is unmanaged but it will also use the app.config to decide
which version of clr to load(1.1 or 2.0) that is why the app.config is exe
based but no dll. So in the same word process we can not run two addin(one
use 1.1 clr and the other use 2.0 clr).

For detailed information, you may try to take a look at Applied Microsoft
NET framework programming written by Jeffrey Richter.

Best regards,

Perter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.