locked
VSTO Add-in and .Net Framework version? RRS feed

  • Question

  • Hello,

    I have a question related to the .NET Framework version executed by a VSTO Add-in.

    Stated here in this link https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/version-compatibility :

    "An app can control the version of the .NET Framework on which it runs, but a component cannot. Components and class libraries are loaded in the context of a particular app, and therefore automatically run on the version of the .NET Framework that the app runs on."

    So my questions are as follow :

    - Is a VSTO Excel Add-in considered as a component or an application, knowing that when we say COM Add-in : Compoenent Object Model Add-in ?

    - In the case that a VSTO Add-in is targetting 4.5.1 NET Framework, and that the OS machine is using for example 4.7 => When runing, does the VSTO add-in runs 4.5.1 or 4.7 NET framework ?

    Thank you in advance.

    Thursday, March 15, 2018 2:53 PM

Answers

  • Hello Hamza,

    1. Add-ins are considered as components to host applications like Excel, Word, Outlook and etc. You can create a configuration file for the host application and specify which version of .net framework you would like to be loaded. However,  unmanaged loaders (shims) of COM add-ins may load their own .net framework versions.

    2. .Net framework 4.7 is an in-place upgrade of 4.5. So, there is no need to install anything on a machine with 4.7 .Net framework installed. Moreover, you need to care about CLR version, not BCL (.net framework).  


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    • Proposed as answer by Terry Xu - MSFT Monday, March 19, 2018 5:52 AM
    • Marked as answer by Hamza_Nouri Tuesday, April 3, 2018 8:55 AM
    Thursday, March 15, 2018 4:29 PM

All replies

  • Hello Hamza,

    1. Add-ins are considered as components to host applications like Excel, Word, Outlook and etc. You can create a configuration file for the host application and specify which version of .net framework you would like to be loaded. However,  unmanaged loaders (shims) of COM add-ins may load their own .net framework versions.

    2. .Net framework 4.7 is an in-place upgrade of 4.5. So, there is no need to install anything on a machine with 4.7 .Net framework installed. Moreover, you need to care about CLR version, not BCL (.net framework).  


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    • Proposed as answer by Terry Xu - MSFT Monday, March 19, 2018 5:52 AM
    • Marked as answer by Hamza_Nouri Tuesday, April 3, 2018 8:55 AM
    Thursday, March 15, 2018 4:29 PM
  • Hello Hamza_Nouri,

    Has your original issue been resolved? If it has, I would suggest you mark the helpful reply as answer or provide your solution and mark as answer to close this thread. If not, please feel free to let us know your current issue.

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, March 19, 2018 5:52 AM