1 Add-In uses .net 1.1, a second uses .net 2.0

Hello;

I just created a simple Add-In using VS 2003. I also have VS 2005 & .net 2.0 (release) installed on my computer.

The .net 1.1 Add-In would only run if I created a winword.exe.config file setting the runtime to .net 1.1. Without that Word would exit during it's startup (no message, no crash - just exit). With the config it runs fine.

So, what if someone wants to run two Add-Ins with Word, one built under .net 1.1 and one built under .net 2.0

thanks - dave


Answer this question

1 Add-In uses .net 1.1, a second uses .net 2.0

  • acorn_atom

    If you install the .NET Framework V2 then Office will host the V2 of the framework and this is by design. We have a COMAddin Shim that we use to load our COMAddin solution which is currently 1.1 based code but this gets Jitted to run as .NET2 code quite happily, there were a couple of nasty breaks but we are over these issues now and have converted our old code to V2 now anyway moving forward. The main issue is that the Host process "Word" can only host one version of the CLR at any one time and this is now forced I presume to be 1.1 and the codebase for the second addin is V2 and hence why this will not load if the config file is forcing word to load and host the old Runtime.

    REgards


  • Leon42

    The main answer is that 1.1 code will run happily in a hosted environment like office with V2 .net FX installed on the machine the default behaviour would be to run .NET 2. In most circumstances the reason for forcing it back to 1.1 code is not a good process to undertake and can break other addins as you have indicated.

    http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnnetdep/html/netfxcompat.asp

    Is a useful link to explain

    Regards

  • Steven Pasetti

    Hi

    I know i had this issue, it worked in Runtime but not in Debug Sad since having fresh machines and no VS2003 on the development machines this issue no longer seems to happen something to do with the Debugger and working and crashing out when the Connect of the IDTExtensibility2 Interface was fired but was v annoying, let me know if you can run in Runtime happily and it is VS.NET that crashes.

    Regards

  • Gig@Byte

    Hi;

    I read all that too. But what I found today was I created a 1.1 Add-In using VS 2003 (did the standard chioces in the wizard) and then when I tried to run it, it would kill Word unless I created a winword.exe.config requiring it to use 1.1.

    So yes, a 1.1 build Add-In is supposed to run under 2.0. But it doesn't - at least on my system. And this was an Add-In that does nothing - just the skeleton that the VS 2003 wizard creates.

    Note, this is an IDTExtensibility2 Add-In, not VSTO.

    thanks - dave


  • S. Ramani

    This may be a VS 2003 issue. When I tried to run my simple VS 2005 Add-In after I built the 2003 one, the 2003 one broke in 2005 in the debugger. So it may be just that you can't run a 1.1 Add-In from VS 2003 if .net 2.0 is on your system.

    I'll post more once I've narrowed this down.

    thanks - dave

  • 1 Add-In uses .net 1.1, a second uses .net 2.0