I made an add-in using VS 2012 and it works fine for me on debugging.
After done, I made a vsi installation file renaming a zip file that contains the .addin, .dll and .vscontent to .vsi
I'd sent this vsi file to another computer, and tried to install.
It's launch VS Content Installer and the installation ocurred with no problem.
But this addin creates a commandbar on top-level menubar (Microsoft.VisualStudio.CommandBars.CommandBar) and includes my addin commandbar inside it.
I'd made a shortcut in Connect.cs to call the addin using ctrl + '
This works fine for me too.
But in other computers, this don't work. The top-level menu and commandbar are not being created, as the shortcut that not works too.
Here is the link of VS with Menubar and Commandbar when are debugging.
http://s4.postimg.org/6j9ptli2l/image.png
Things to check:
If the user uses roaming profiles and/or has his VS add-in directory on a network drive / UNC path... ...the assemblies will not be trusted, and VS will fail to load the add-in.
Also make sure that they have the AddIn checked to load and run...
On the Tools menu, click Add-In Manager.
Is the Add-in registered to run with Visual Studio ?
Can you check that the Add-In dll is installed in the path you asked it to ?
(for locations: See File Locations)
Related
I have created an Web Add-ins project for Word using Visual Studio.
I have Office 2016 Professional Plus installed on my system.
When I try to launch the application using F5. Everything works, but when I click on the button in the ribbon menu to show the task pane. Task pane is shown but with following error message.
ADD-IN ERROR
This add-in could not be started. Close this dialog to ignore the
problem or click "Restart" to try again.
UPDATE:
I have tried to create a new project/solution and without modifying anything. It is giving the same error on running or hitting F5.
UPDATE 2:
I have verified that I have Latest version of Office developer tools installed.
I shared the same application that I created with another colleague here and it did not run on his machine either, but when I tried to create a File->New Project on another machine (it worked there) and tried to run that on my system and it didn't work.
I was facing this issue because of a bad environment setup. After I uninstalled and then reinstalled Visual Studio, everything started working again, as suggested in #JuanBalmori's comment.
I have created Visual studio add-in successfully.But I am confused to deploy this addin in another computers.I have go throgh the stackoverflow answers.But I did not get clear cut idea about this matter
You just need to copy YourAddIn.dll and YourAddIn.AddIn files to "c:\Users\username\Documents\Visual Studio 2012\Addins\" folder on another computer. To create an installer you can start with Wix Template For VS2012 Addin Project.
Deploying an add-in requires to copy the add-in dll(s) to some folder and create a XML .AddIn file in a predefined folder where VS can locate it where a entry of the XML file points to the add-in assembly.
For articles about the prefedined folders for .AddIn files and about creating a setup see the "Articles about installing and uninstalling" section of my web site:
http://www.visualstudioextensibility.com/articles/add-ins/
To troubleshoot problems loading add-ins see my article:
HOWTO: Troubleshooting Visual Studio and Office add-ins
Visual Studio is a 32-bit executable, so the add-in dll and dependencies must be 32-bit.
I have a VSTO Excel workbook project that I can debug fine on my laptop. The project solution also accesses some special hardware on another computer and the project was debugging there fine yesterday in VS2010. Today, it stopped hooking into Excel on debugging on this computer. F5 starts Excel, but the add-in doesn't load breakpoints in the Workbook startup events, etc... Same project from version control debugs fine on my laptop, so something is whacked with Excel or VS on this computer. I’ve seem some related notes/posts on VSTO logging and resetting Excel, but has any beat their head against this?
UPDATE: this solution didn't work for me.
As I was typing I found this similar and promising title...
Excel won't open/launch VSTO AddIn when running in debug mode of Visual Studio 2010
My issue occurred due to having the release version of the app installed and trying to run the debug version. Have to then uninstall the release version, Clean then Build, then re run the add in.
Weird!
Just check if the add-in is disabled.
Office menu > {Word/Excel/PowerPoint} Options > Under “Manage” select “Disabled Items” and then click Go.
For more information read http://blogs.msdn.com/b/vsod/archive/2008/04/22/troubleshooting-com-add-in-load-failures.aspx
/Artha Wijendra
You may need to completely wipe all traces of previously installed versions of your VSTO. Try this:
Remove the registry key for your VSTO from HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Excel\AddIns. If you're working with Office 32-bit on a 64-bit machine then look in HKEY_CURRENT_USER\SOFTWARE\WOW6432Node\Microsoft\Office\Excel\AddIns.
Remove folder C:\Users\ {username} \AppData\Local\Apps\2.0 (You may need to reboot the machine first to release locks on files within this folder structure.)
Open Excel. Go to Files > Options > Add-Ins > Manage COM Add-Ins and remove your VSTO if it is listed.
Clear the ClickOnce cache by typing this at the command prompt: rundll32 dfshim CleanOnlineAppCache
If that still doesn't work then also try removing all keys/values from the registry that reference your VSTO and its related assemblies.
When my Excel Add-In would not load when I hit "Start" in Visual Studio to debug, all I ended up doing to fix the issue was "Rebuild" my solution.
I'm having some issues deploying a Visio addin.
Running the VSTO file works on my computer, but whenever I try and move it to any other user's computer it throws an error on deployment.
I thought it might be a setting I'd set in the project properties so I created an entirely new plugin project and set it to display a message box on startup.
The error I'm getting is:
An error occured during customization install.
The expected element "addIn" was not found in the XML.
This is caused by an issue with Clickonce.
I found a workaround by installing the addin using MSI.
This Guide was a lot of help.
Taken from the section about registry settings for the msi installation:
It is important to note the ‘|vstolocal’ value appended to the end of the Manifest value. This informs the VSTO runtime that it is locally installed and to not invoke the ClickOnce installer.
I'm having the same issue with our Word, Excel, Outlook and PowerPoint add-in. The installation of the msi runs perfect.
When starting Word for example, the Add-in itself gets 'installed' and then I receive the error.
I have added |vstolocal to the registry, which is located in the HKCU tree.
The projects is a Visual Studio 2010 project, build on TFS 2008. The installation on an Office 2010 goes well, the error only occurs when Office 2007 is on the machine.
Anything else I'm overseeing?
The solution to my experience with this issue was the one given by Joeri on the 8th July - install Visual Studio 2010 Tools for Office Runtime on the target machine.
This is an issue with the version of Visio your add-in targets versus what is installed on the client machine. AddIn is an element that is new with the 2007 versions of Office. More than likely the client is running Visio 2003.
Some times the Visual Studio 2010 Tools for Office Runtime is installed on the machine but the vsto file fails to find it. In this case try if you can manually execute the installation command line.See example below (replace X with your own drive letter, path, and file name):
"c:\Program Files\Common Files\Microsoft Shared\VSTO\10.0\VSTOInstaller.exe" /Install file:///X:/XXX/XXX.vsto
I developed a new Office 2007 addin using VS 2008 and VSTO. after this I go to
Office->Excel Options->AddIns->COM AddIns and GO... If I select the .dll which I ve created I get the error
'<path>' is not a valid Office Add In.
If I run it using the Visual Studio 2008 at my development machine, it works fine and I see the add-in.
I searched so many posts but didn't get a solution.
Excel kept rejecting the Add-In, so the solution for me was doing it directly via the registry.
Save the below text as a .reg file, replace the Manifest path and FriendlyName to suit your PROJECT and double click the reg file to add the key to the Registry.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\PROJECTExcelAddIn]
"Manifest"="file:///C:\\TFS\\Pg.PROJECT\\PROJECTExcelAddIn\\Src\\PROJECTExcelAddIn\\PROJECTExcelAddIn\\bin\\Debug\\PROJECTExcelAddIn.vsto"
"FriendlyName"="PROJECTExcelAddIn"
"LoadBehavior"=dword:00000003
"Description"="PROJECTExcelAddIn - Excel add-in for PROJECT."
VSTO does not create COM Addins. You will need to install your add-in on non-development machines. The article Adding the Office Primary Interop Assemblies as a Prerequisite in your ClickOnce installer at http://blogs.msdn.com/vsto/archive/2008/05/08/adding-the-office-primary-interop-assemblies-as-a-prerequisite-in-your-clickonce-installer-mary-lee.aspx will get you started.
Actually, you'll have to publish the addin. Then, the Visual Studio will create a folder in Debug folder named app.publish folder with other folders in and, the important thing, a setup file named setup.exe.