Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6844339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:21:52+00:00 2026-05-27T00:21:52+00:00

I am caught up in a real messy situation. Scenario: I have a Excel

  • 0

I am caught up in a real messy situation.

Scenario:
I have a Excel automation VBA add-in that calls a .NET 4.0 library (via ExcelDna). This 4.0 library invokes some methods in the 2.0 mixed mode library. Hence had to set ‘BindAsLegacyV2Runtime’ to the 4.0 CLR. I set this in the 4.0 library and when excel instantiates this library the CLR loads with this attribute set and everything works fine.(See this link). I cannot modify the excel.exe.config as it is denied in production machines.

I start excel process from a batch file and load my addin as :

Start Excel.exe my4.0addin.xla

Problem:
Found this doesnt work in few user machines and investigated the issue to find that excel was loading pre-installed addins in the machine first before it loads the addin passed in as parameter.
Hence, before the 4.0 add-in loads, excel was loading 2.0 CLR because of some other add-ins.
Hence the attribute is failed to set and the logic goes for a toss.

I cannot modify the excel.exe.config (to add the attribute to config) or register my addin, since both these require admin permissions on the user machines and it is not possible in my environment.

Hence, is there a way to control excel loading the addins or any way to make this work ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:21:53+00:00Added an answer on May 27, 2026 at 12:21 am

    Here is a way I got this working. Could be useful for someone.

    I wrote a WCF service that exposes my 4.0 functionalities. This is in .NET 4.0 (4.0 CLR).

    I wrote a 2.0 client that consumes the wcf service via generated proxy. This is in .NET 3.5. (2.0 CLR). I then converted by addin to be in .NET 3.5 and consumed this client which is also in .NET 3.5
    In the addin I can now directly use the 2.0 mixed mode assembly plus also have access to 4.0 functionalities via the wcf service.

    Hence I avoided the the binding attribute and managed to keep my addin in 2.0.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to setup a few fixes in some code that have caught
I have a script that calls the facebook test api to automate test account
I've been learning a bit about canvas and something that caught my attention (mostly
I just discovered that truncate {table} statements are not caught by most database triggers.
Question 1: Is is possible to throw an exception that will not be caught
This caught my attention last night. On the latest ALT.NET Podcast Scott Bellware discusses
I got a ASP.net webservice which calls a COM+ component. A class in the
I wrote a .Net application that has nothing to do with network communication. There
When catching an exception in .NET, you can have as many type-specific exception blocks
I'm getting caught up on PHP again, and have the following update code. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.