Troubleshooting
link - learn.microsoft.com/en-us/microsoft-365/troubleshoot/group-policy/office-add-in-not-loaded
Message - The file format and extension of 'myAddin.xll' don't match
The file format and extension of 'myAddin.xll' don't match
The file could be corrupted or unsafe.
Unless you trust its source, don't open it. Do you want to open it anyway?
When you try and load an "xll" file automatically you see this prompt.
Make sure the folder path of this add-in is included in the System, Path, environment variable.
Message - The System cannot find the file specified
The system cannot find the file specified
System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HResultL 0x80070002)
at System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore(UInt32 Flags, IntPtr hToken, Guid& riid)
at System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore()
Check there is an APPDATA environment variable.
Open a "cmd" prompt and type "set".
Check there is an APPDATA entry.
Message - Exception reading manifest from file
Exception reading manifest from
file:///C:/Program Files (x86)/ .. / AppName.vsto
the manifest may not be valid or the file could not be opened
The version of the .NET Framework that is installed on the machine does not meet the minimum requirements for the add-in.
Check the target framework for the add-in, Properties, Application tab.
Message - The name 'Globals' does not exist
The name 'Globals' does not exist in the current context.
Check that all the namespaces are consistent and correct.
Make sure that files in subfolders have the correct namespace.
Message - ThisRibbonCollection does not contain a definition for GetRibbon
ThisRibbonCollection' does not contain a definition for 'GetRibbon' and no extension method 'GetRibbon'
accepting a first argument of type 'ThisRibbonCollection' could be found.
Check that all the namespaces are consistent and correct.
Make sure that files in subfolders have the correct namespace.
Message - A runtime error occurred during the loading
Not Loaded. A runtime error occurred during the loading of the COM Add-in
Check the registry entry:
HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\
Message - Could not load file or assembly
Could not load file or assembly 'XmlSerializers' or one of its dependencies.
The system cannot find the file specified.
Check excel.exe.config and remove/rename it.
Message - The common language runtime could not be loaded
The common language runtime could not be loaded by
file:///C:/Program Files (x86)/ .. /AppName.vsto|vstolocal.
Contact your administrator for further assistance.
Check the correct version of the Visual Studio Tools for Office Runtime is installed
Check excel.exe.config
This can occur when you perform an "in place" office upgrade from a previous version and the add-ins from the older version are still installed.
This is often a result of the add-in trying to load an older version of the .NET Framework.
Check and Install the required version of the .NET Framework.
Check the value of the PreferredClr in the following registry key.
HKEY_CURRENT_USER\Software\Microsoft\VSTO\SolutionMetadata
Message - ButtonClick Exception
An exception occurred while calling function 'ButtonClick'.
Could not load type 'Solution.Project' from assembly
Check the assembly modified dates and that the assembly contains this class
Message - Downloading file .vsto did not succeed
Downloading file:///C:/Program Files (x86)/ .. / AppName.vsto did not succeed
Could not find a part of the path
The file cannot be found, make sure the installation folder exists.
Message - The customization cannot be installed
The customization cannot be installed because another version is currently installed and cannot be upgraded
from this location.
This is normally seen on development machines and indicate that there is more than one registry entry for this application.
Remember that building a project results in registry keys being added automatically.
If you also have the application installed then this would create a duplicates.
Message - Unable to install this application because an application is already installed
Unable to install this application because an application with the same identity is already installed.
To install this application, either modify the manifest version for this application
or uninstall the preexisting application.
There are two ways to clear the ClickOnce Application Cache mage -cc or rundll32 dfshim CleanOnlineAppCache
Message - Customization does not have the permissions required
Customization does not have the permissions required to create an application domain
The location of the add-in (or document-level solution) is not in the Office Trusted Locations list or all trusted locations are disabled.
It is always better to work on your C drive.
Message - Ambiguity between method "" and non-method
Ambiguity between method 'Microsoft.Office.Interop.Word._Document.Close(ref object, ref object, ref object)'
and non-method 'Microsoft.Office.Interop.Word.DocumentEvents2_Events.Close'. Using method group.
Ambiguity between method 'Microsoft.Office.Interop.Excel._Worksheet.Activate()'
and non-method 'Microsoft.Office.Interop.Excel.DocEvents_Events.Activate'. Using method group.
Change the document data type to Word._Document instead of Word.Document or cast the document to Word._Document ((Word._Document)myDocument)
Message - Managed Add-in Loader failed to initialize
Not Loaded. The Managed Add-in Loader failed to initialize.
Check the correct version of the Visual Studio Tools for Office Runtime is installed.
Message - Method not found "get_COMAddIns"
Method not found "Microsoft.Office.Core.ComAddins" Microsoft.Office.Interop.Word - Application.getCOMAddIns()
Reinstall Office 2007.
Message - Unrecognised configuration section UserSettings
Configuration system failed to initialise.
Delete the user.config file from the following location.
C:\Documents and Settings\"----"\local settings\Application Data\Microsoft_Corporation\AppName.dll.manifest_\
Message - Unable to find a version of the runtime to run this application
Unable to find a version of the runtime to run this application
Check that .NET framework is installed correctly.
Message - The add-in could not be installed
Application manifest has either a different computed hash than the one specified or no hash specified at all.
You need to regenerate the application manifest. Delete all files from the Debug/Release folders.
Message - MyAddin.dll has a different computed hash
MyAddin.dll has a different computed hash than specified in the manifest.
You need to regenerate the application manifest. Delete all files from the Debug/Release folders.
Message - Customization could not be loaded
Customization could not be loaded because the application domain could not be created.
Reinstall .NET Framework 3.5.
Reinstall VSTO Runtime 9.0.32.
Message - An Application with the same identity is already installed
An Application with the same identity is already installed
.NET ClickOnce applications get deployed into a subfolder of C:\Documents and Settings\\Local Settings\Apps\2.0
You need to clear the ClickOnce cache.
cd C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\ Mage.exe -cc
Message - Add-in could not be found or loaded
Could not load file or assembly "Microsoft.Office.Interop.Word Version=11.0.0.0" or one of its dependencies.
The system cannot find the file specified.
Change your install of Office to not include Smart Tag .NET Programmability Support.
Remove the VSTOSmartTags entry from the ThisAddin.Designer.xml file.
and then comment out the four references to this.VSTOSmartTags in ThisAddIn.Designer.cs.
Message - Value does not fall within the expected range
Value does not fall within the expected range
Remove any special characters (& in the network install path) from Manufacturer Property.
Message - The expected element "addin" was not found in the XML
The expected element "addin" was not found in the XML
If you add-in was created in Visual Studio 2010 targetting .NET 4.0 and running in Office 2007 then you must have the 2010 VSTO runtime installed on that PC.
If you were using Office 2010 this is not a problem.
Message - Cannot access a disposed object
Cannot access a disposed object
This is a known bug in Visual Studio 2008 SP1.
Install VSTO Runtime v3 SP1.
Customize office installation - remove Smart Tag .NET programmability support.
Remove the line "ThisAddInDesigner.xml".
Message - MyAddIn is not a valid Office Addin
MyAddIn is not a valid Office Addin
Check the security permissions using caspol.exe
Your setup project will need to use the SetSecurity project.
Message - Cannot find the interop type
Cannot find the interop type that matches the embedded interop type 'Microsoft.Office.Interop.Excel.Workbook'.
Are you missing an assembly reference?
The corresponding PIA is not installed on this machine
Disabling
Automatic Disabling
MS Office can automatically disable add-ins that behave unexpectedly when they are being loaded.
An add-in might be disabled every time the application starts if it has caused problems or crashed.
It is very easy to re-enable an add-in that has been disabled
There are two types of automatic disablying that Office uses:
Hard Disabling - help > about > disabled items
Soft Disabling - com add-ins dialog box
Hard Disabling
When an add-in is loaded, code causes the application to close unexpectedly or when you stop the debugger before the startup event or constructor has completed.
This generally happens when the application closes unexpectedly.
In 2003 hard disablying will disable both the add-in and the AddInLoader.dll
in 2007 hard disablying will only disable the add-in
If the loader is disabled then no VSTO add-ins will be loaded (despite them being in different application domains)
The disabled add-in must be removed or reactivated before any other VSTO add-ins are loaded.
Soft Disabling
When an add-in is loaded there is an exception but the application does not close unexpectedly
Soft disablying changes the LoadBehavior registry entry to the value 2.
In 2003 soft disabling will only disable the solution add-in.
This generally occurs when an unhandled exception has occurred in the addins startup handler. The error must be corrected before reenablying
The add-in will appear in the COM Add-ins dialog box but will remain unticked.
SS - Not Loaded - A runtime error occurred during the loading of the COM Add-in.
Environmental Variables
Windows 7 - Control Panel, System, Advanced System Settings, Advanced Tab, Environment Variables.
These must be added to the User Variables and not the System Variables.
VSTO_EVENTLOGDISABLED - 0
You can use the event viewer to see messages captured by the VSTO runtime.
Applies to document level and application level projects in 2007 and 2010
0 - enables event logging (default)
1 - disables event logging
SS
VSTO_LOGALERTS - 1
This environment variable allows you to write the error messages to a log file.
For an add-in this log file (manifestname.manifest.log) is created in the folder that contains the deployment or application manifest
For a document-level solution this log file (documentname.extension.log, ExcelWorkbook1.xlsx.log) is created in the folder that contains the workbook or document.
This is only relevant if the add-in has full trust
1 - populate log
0 - suppress log (default)
If that fails then the log file is created in the local %TEMP% folder
SS
VSTO_SUPPRESSDISPLAYALERTS - 0
This environment variable allows you to display each error message in a message box.
This is only relevant if the add-in has full trust
0 - display alerts
1 - suppress alerts (default)
This displays the "Microsoft Office Application Add-in" dialog box when the application starts
SS
Event Viewer
Starting in Visual Studio 2008 SP1 error messages that are captured by the runtime will appear in the event viewer.
Control Panel > Administrative Tools > Event Viewer - Application
Event Source = VSTO 4.0 | VSTO 3.0
Event Source = .NET Runtime
SS
Sub CreateEnvironmentVariable()
Dim wshShell As Object
Dim wshUserEnv As Object
Set wshShell = CreateObject("WScript.Shell")
Set wshUserEnv = wshShell.Environment("USER")
' Set the environment variable
wshUserEnv("VSTO_SUPPRESSDISPLAYALERTS") = 0
MsgBox "Environment Variable VSTO_SUPPRESSDISPLAYALERTS was created", vbOKOnly + vbInformation, "Success"
Set wshUserEnv = Nothing
Set wshShell = Nothing
End Sub
Sub RemoveEnvironmentVariable()
Dim wshShell As Object
Dim wshUserEnv As Object
Set wshShell = CreateObject("WScript.Shell")
Set wshUserEnv = wshShell.Environment("USER")
On Error Resume Next
wshUserEnv.Remove ("VSTO_SUPPRESSDISPLAYALERTS")
If Err.Number = 0 Then
MsgBox "Environment Variable VSTO_SUPPRESSDISPLAYALERTS was removed", vbOKOnly + vbInformation, "Success"
Else
MsgBox "Environment Variable VSTO_SUPPRESSDISPLAYALERTS doesn't exist in the system", vbOKOnly + vbCritical, "Error"
End If
Set wshUserEnv = Nothing
Set wshShell = Nothing
End Sub ()
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext