Outlook 2010 add-in doesn't update after edit - outlook

I have a problem developing an Outlook 2010 add-in in Visual Studio 2010.
When I create a blank add-in project and just add messagebox to the startup event saying 'Test' everything is ok. Outlook starts, installs the addin and shows the message.
Then I close the Outlook and change the string to 'Test1'. Rebuild the solution and run it and then it just says 'Test' again. It doesnt update the plugin itself.
What's wrong? How to force Outlook to update the add-in?
Thank you

It should update automatically. You can try Build -> Clean solution (this unregisters the AddIn from the Outlook) then run it again.

Related

Debug Outlook VSTO Plugin from Visual Studio 2017 does not work --> debug not possible removing deployment from Outlook

I created a VSTO Plugin for outlook (2016). During development i could press und debug then outlook started and I could debubg by plugin.
Now I created a deployment and installed it in outlook. Then I removed the installation from outlook by hitting remove in the "Com-AddIns ... "
After that I restarted outlook and tried to Debug my plugin. Outlook still starts but it does not add the plugin to outlook?
So I tried to install the plugin and then try to start debug from visual studio.
Now it says that it could not install the plugin as there is already such a plugin installed.
After that I tried to manually add the Plugin dll by selecting "Add" from the dialog referred to above. I selected the dll from bin\Debug. Outlook says that this is not a proper outlook plugin
do you have any idea what I could do to be able to debug my outlook plugin again?
Best regards
Hannes
I am such a stupid person:
First it is not sufficient to remove the plugin by using the COM-diaog. You need to remove it using System Settings.
After the "old" plugin is removed completey from the system you need to reinstall the debug version. for this doubleclick on the *.vsto file in the bin\debug project of your visual studio project.
This should do the job.
You could use the "VSTOInstaller.exe " to uninstall your add-in. Please refer to the following link:
Uninstalling Office VSTO addins

Outlook 2016 Add-In doesn't work for some users

We've created an Outlook add-in which integrates our custom CRM with Outlook. A command button is added to messages in read and compose mode. A function file is called on the button click.
The add-in manifest passes validation and installs properly on all machines. However on Outlook 2016 desktop (only) we are seeing an error on some machines. The exact error message says: “We’re sorry, we couldn’t access [NCS Outlook Add-in]. Make sure you have a network connection. If the problem continues, please try again later.” ([NCS Outlook Add-In] is the name of our add-in.)
Note that this message appears IMMEDIATELY after clicking the add-in command button. It does not first say “[NCS Outlook Add-in] is working on your request” like it add-ins do when an error has occurred.
We have tried Outlook logging and haven't found anything useful in the logs. We've checked settings and disabled other add-ins. We have also tested across machines with user accounts. The same user will have the error on one machine and not the other. In short, it seems that the error is machine specific and not profile related.
Version of Office 365 installed: 1705 (Build 8201.2209).
We experienced this exact behavior in Outlook 2016, the solution was to enable protected mode for the restricted and internet zones.
The easiest way to change this is in IE.
In Internet Explorer, click the Tools button, and then click Internet Options.
Click the Security tab, and then select the Restricted Sites Zone.
Select the Enable Protected Mode check box, and then click OK.
Restart Internet Explorer.
Here is a little more information:
https://support.microsoft.com/en-us/help/2761180/apps-for-office-don-t-start-if-you-disable-protected-mode-for-the-rest
Try this:
1) Close Outlook
2) Rename the folder C:\Users\%USERNAME%\AppData\Local\Microsoft\Outlook
to C:\Users\%USERNAME%\AppData\Local\Microsoft\Outlook.OLD
(Where %USERNAME% is current User Name.)
3) Start Outlook, Setup User Profile
4) Add/Test Add-In.
If that works, then something broken on old Outlook profile. But if same problem: Exit Outlook, delete the Outlook folder and rename Outlook.OLD back to Outlook.
I ran into this exact same problem after uninstalling Visual Studio 2015 on my development machine. (I had been using Visual Studio 2017 for Outlook add-in development.)
The problem went away as soon as I reinstalled Visual Studio 2017. The Outlook 2016 installation had nothing to do with the problem, I never changed Outlook or its profile at all.
This would indicate that the problem is somehow related to the SDK tooling on the machine...perhaps something to do with the .Net framework?
If I ran into this problem on a customer machine I would try reinstalling or repairing the .Net framework, or perhaps reinstalling Outlook (assuming it contains some add-in tooling that is broken.)
Just passing this on in case it helps anyone else.

Creating Visual Studio AddIn run error

This has been happening to me over and over for every single AddIn project I make.
I create the AddIn projet from the template wizard and work on it, coding and debugging for a few hours and then all of a sudden I get:
Error 1 Unable to copy file "obj\Debug\Project1.dll" to "bin\Project1.dll". The process cannot access the file 'bin\Project1.dll' because it is being used by another process.
Does anyone know what is this about?
Happening in VS2008 and VS2010.
Thank you
*Edit: I have found a workaround by closing all instances of VS, deleting the Project1.dll file, selecting NO when VS asks me if I want to delete a reference to the AddIn when opening VS instance again.
I actually came across this today and it took me forever to figure it out. For me I was creating an Addin that automatically loaded when Visual Studio starts. The way I fixed it was by going to:
Tools -> Add-in Manager
Then uncheck the first checkbox near your addin. Keep the "Startup" checkbox checked to continue having debugging of your Addin.
Hope this helps.

Outlook 2010 not launching when I debug my Outlook addin?

I'm totally confused as to how to debug an Outlook 2010 addin I'm trying to develop. I created a new Extensibility | Shared Add-in project and just checked Outlook, and it's created a new project for me with a stub implementation of the Extensibility.IDTExtensibility2 interface in my Connect.cs file. However, when I press F5 to debug, although the project compiles OK, a new instance of Visual Studio opens up instead of Microsoft Outlook! How am I supposed to debug my addin?
Since Outlook is the host process that will load your code you have to make sure that Outlook is the target application for debugging (go to project properties and select the main Outlook EXE under the Start external program option in the Debug settings).
Then of course you have to also make sure that your plugin is actually being loaded by Outlook. With that in place you should be able to debug your plug-in with VS.

Lift VisualStudio write lock on an addin dll

I am trying to find my way around the addin concept of VisualStudio 2010 but I keep on getting the same error when I compile the solution:
"unable to delete file '.\bin\VSA.dll'. Access to the path [...] is denied"
I suspected this would happen when the addin is loaded in the "dev instance" of Visual Studio while I try to compile the solution, but the addin seems to be correctly ticked out in the "Add-In Manager" and the .Addin file contains <LoadBehavior>0</LoadBehavior> which should be right.
Any idea what could be causing the lock or how to track down what is? Thanks!
You have to restart VS for the addin to get unloaded, ticking out the checkbox won't unload the assembly from devenv.exe.
What seems to be working for me is to have the addin ticked out and start 2 instances of VS one with the adding project opened and one to debug the addin in.
Then enable the addin in the second instance to trigger the addin's initialization and debug it.
Disable the addin in the second instance of VS, close the VS.
Recompile the addin project in the first instance, start a second instance again.
Another simple way is to tick off the checkbox, close Visual Studio, delete the output files and finally restart Visual Studio.
Unlocker is a useful program for when you're unable to build because your dlls are locked.

Resources