Daniel Szabo
Daniel Szabo

Reputation: 7281

Office Add-in Re-Installation Error: Could not Load File or Assembly

I'm trying to re-deploy an Office Addin. It installs and everything appears to be OK, but it fails to launch. After setting environment variable VSTO_SUPPRESSDISPLAYALERTS = 0, I am getting the following message when I start MS Project:

Could not load file or assembly Microsoft.Office.Tools.Common.v4.0.Utilities

I've verified that that assembly is getting bundled in the ClickOnce app. I'm pretty much stumped at this point and don't know where to look next. Can anybody offer any guidance?

Thank you!

Upvotes: 4

Views: 1778

Answers (2)

Daniel Szabo
Daniel Szabo

Reputation: 7281

After verifying that the runtime was good on the client machine, and after multiple attempts at recompiling/reinstalling (and still getting the same error), I finally fixed the problem. I really hate what I had to do, so please post if you have a better solution.

Steps

  1. Uninstalled Plugins via Add/Remove programs

  2. Went into registry and deleted all entries at
    KEY_CURRENT_USER > Software > Microsoft > Office > MS Project > Addins

  3. Also had to delete entries in HKEY_LOCAL_MACHINE > Software > Microsoft > Office > MS Project > Addins (not sure how those got there in the first place...)

  4. Deleted the apps folder at C:\Documents and Settings\[user name]\Local Settings\Apps\2.0 (note -- this one sucks because it deletes ALL apps -- not just the plugins...) You can get cute and try to pick'n pull your specific vsto plugin files, but at this point I was so pissed I just waxed the whole damn thing)

  5. Delete the App cache from the command prompt with the following command:
    rundll32 dfshim CleanOnlineAppCache

I have successfully reproduced the error and used this method to solve three times now, so I'm pretty confident in it. I don't know why reinstalls throw the original error, but at least I've got a workaround now.

Hope this helps someone else!

Upvotes: 3

Kiru
Kiru

Reputation: 3565

Do you have prerequisites installed like Dotnet framework and the VSTO runtime? I think the clickonce has bundled the assembly but the application looks for it in the GAC or something.

Upvotes: 0

Related Questions