
Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
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.