none
Common CLR for an Excel Add-In? RRS feed

  • Question

  • Hi

    While Visual Studio Community 2017 was working well with VSTO last week, today I didn't understand why but no matter whatever project I start on the template Excel 2013 and 2016 Add-In upon Start (F5) it resulted with the common error:

    The common language runtime could not be loaded by...

    Quite a lot of discussion on net led me to looking into, find & conclude that I needed to change .Net Framework from 4.6.2 to 4.6.1 at the start. It's the first time I had this experience. In this regard please see if any of you experts could help me by answering the following questions:

    1. How can I check the appropriate CLR of a machine?

    2. What Target Framework should I select / change to have an add-in be used by the most?

    Thanks

    Friday, December 15, 2017 6:49 AM

Answers

All replies

  • Hi Faraz A. Qureshi,

    you need to select that .net framework which is supported by the VSTO Project and which is also available on your client machine on which you are going to install this Addin.

    I think that this error was occurred due to some Windows related or Office related updates.

    you can try to check whether there are some updates that installed with in last week.

    it will help you to find the root cause of the issue.

    you can try to revert the update to the last working update and again try to reproduce the issue.

    if that working correctly then we can surely say that it is update related issue.

    then after you can use the old update temporarily and when new update get launched , you can try to install it to avoid this issue.

    let us know about your testing results, we will try to provide you further suggestions to solve the issue.

    Regards

    Deepak


    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, December 18, 2017 2:37 AM
    Moderator
  • Hi Faraz,

    >> I needed to change .Net Framework from 4.6.2 to 4.6.1 at the start.

    Did it resolve your issue by changing from 4.6.2 to 4.6.1?

    >> What Target Framework should I select / change to have an add-in be used by the most?

    In general, Target Framework would not break your project if you already have installed on the computer.

    If you create a new Excel AddIn with Target Framework as 4.6.2, will it throw the same exception? I make a test at my side, it works correctly.

    Best Regards,

    Tao Zhou


    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, January 1, 2018 8:00 AM
  • Finally Googling did help out by disclosing use of registry key values to be used in this regard.

    https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed

    Friday, January 5, 2018 9:51 AM