none
Unable to deploy VSTO excel add-in made using VS 2010 in a client having .Net 2.0 or above. The target framework while making the add-in was set a .Net 4.0 client profile. RRS feed

  • Question

  • I have made an excel add-in in visual studio 2010 while the target framework was 4.0 client profile.
    Now I want to deploy the add-in in my client machines. So I have a Basic Setup project in place for the Excel add-in under the same solution.
    I have included all the project outputs and required manifest files in the setup project and also added a registry key under HKCU.
    Also, I have embedded interop assemblies in my add-in project using the Embed Interop attribute of the references.

    Along with that I have also used : 

      <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v2.0.50727"/>
        <supportedRuntime version="v4.0.30319"/>
      </startup>

    This in my app.config file to support different run-times as, I am not using any assembly in my project which is not available from .Net 2.0 itself.
    Apart from the Excel Interop I am using all the basic references like System.Data, so I would like my add-in to run in .Net 2.0 and above .

    The thing with the client machines is that they will be having .Net 2.0 or above and not necessarily .Net 4.0.

    So, when I install my add-in on a client machine with .Net 3.0 the installation runs smoothly but it fails to load on excel startup.

    If anyone knows a Solution/Work-around to this problem please help me out. I am trying to make a add-in which does not require my client machine's to download the 4.0 client profile.

    Thursday, September 13, 2012 10:18 AM

Answers

  • Hi sutharmonil,

    Thanks for posting in the MSDN Forum.

    It's based on my experience that your goal is hard to be approach. There seems no work round for your issue. .Net framework 4.0 client profile is the most basic needs of your add-in.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 17, 2012 2:24 AM
    Moderator

All replies

  • Hi sutharmonil,

    Thanks for posting in the MSDN Forum.

    It's based on my experience that your goal is hard to be approach. There seems no work round for your issue. .Net framework 4.0 client profile is the most basic needs of your add-in.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 17, 2012 2:24 AM
    Moderator
  • Hi Tom,

    Thanks for your response. I figured a way to eliminate the problem.

    I moved my code from Excel add-in 2010 in .Net frame work 4.0 client profile to Excel add-in 2007 .Net framework 3.5. 

    All the assemblies included in the 3.5 framework project have .net 2.0 as their runtime.

    So, now I am able to install and run my add-in on .Net 2.0 and on-wards.

    There was some rework in the ribbon code, as the RibbonBase class is available in 4.0 and upwards only.

    Also, had to do some re-write in ThisAddIn class, while using interop. But was able to achieve the same functionality as earlier.


    sutharmonil

    Monday, September 24, 2012 6:19 AM