Excel Addin RibbonBar shows old Buttons - c#

I have an Excel addin which has a ribbonbar.
The ribbonbar has some buttons and checkboxes, etc.
Recently, I removed a checkbox and added a button instead.
The ribbonbar shows correctly in the designer but isn't showing the button in Excel.
It seems that the ribbonbar is not being updated.
In Designer:
InExcel:
I guess Visual Studio places the DLLs, etc. in a temp folder while debugging but I am not sure where this might be.
My question is: Why is the button not showing? Are there temporary files which may lead to this error?
When debugging, I can see that the visible property is set to true and that it is correctly added to the group.
Some info:
I am using Excel 2007 with Visual Studio 2010.

When you start debug session from visual studio the addin is installed. It is possible that visual studio did not reinstall the addin correctly. Can you try to remove the addin from excel explicitly following this steps:
Start Excel as you normally do (not from visual studio), Go to File -> Options -> Add-ins
From the Manage drop down pick COM Add-ins then click Go
Find your add-in mark it and click Remove
Now if you start new debug session probably the toolbar will be updated.
If this resolve the issue, the cause is as you've said it - related to some cached dll.

Related

Visual studio TEST missing from the main menu

After updating to visual studio 2013, update 4, the TEST option is missing from my screen, I thought Visual Studio update 5 would fix it, but it did not. "TEST" is missing from my options and I don't know why.
I have tried resetting the settings, it does not help, reset settings:
I cannot add test via TOOLS -> CUSTOMIZE -> COMMANDS -> ADD COMMAND, it is not there.
What edition of Visual Studio are you working with? Have you ever had
the TEST menu present?
Yes, I've run tests before, I'm currently
at Visual Studio 2013.5 - Premium flavor
#OP answered:
I don't know why, but uninstalling Office Tools extension seems to have fixed it.
I wanted to provide an explanation for why Menu's can go missing. One reason for this is when you install another component for Visual Studio, like Team Foundation Client or in this case Office Tools extension. They "may" automatically select a different setting. To check if this is the problem:
In Visual Studio click Tools Menu > Import and Export Settings:
See here how Project Management Settings is selected, that is the wrong setting if you're a Developer.
To see the missing developer menu's reset it back to a developer setting.
Ref: http://blog.accentient.com/a-visual-studio-mystery-the-case-of-the-missing-menu-items/
I had the same issue in VS 2015 Update 2 Community and the culprit apparently was AppInsights extension (https://github.com/dotnet/roslyn/issues/11653). To provide some detail:
Noticed test menu missing in existing solution where I previously ran tests
Made a blank test project, still no test menu
closed vs and reopened. Still not test menu
Got error referencing C:\Users{username}\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml
Last error in there was NullReferenceException in CodeLensIndicatorService
Googling that found link above, tieing to this add-in.
disabling it fixed the issue and test menu not appears and I can run tests.
Forgive me if I complain a bit, but if any VS team is reading: Under no circumstances should an add-in failing cause a built-in menu to not appear. As much as this is a bug caused by the the various add-ins, it is also a flaw in VS IMO- and one that is not trivial for end-users to connect the dots on.
Somehow the settings (settings have menu items configuration also) for your visual studio may have issue. Either you can try reset. Only in case that doesn't work you can always customize your menu item. so
Tool -> Customize (by default standard should be selected)
select commands tab and then menu bar option. You can see options to add commands. Under that you can select test so make testing option visible.
Also for testing test case, you can always right click on class and run it.
Hi Please try to reset all setting
http://blog.accentient.com/a-visual-studio-mystery-the-case-of-the-missing-menu-items/
If not then there is workaround to add your setting
http://blogs.msdn.com/b/visualstudioalm/archive/2012/09/11/visual-studio-2012-where-is-the-test-toolbar-couldn-t-find-it-anywhere.aspx
After doing close visual studio instances and reopen it.
I don't know why, but uninstalling Office Tools extension seems to have fixed it.
Edit: I tried to reproduce this bug, I ran the VS2013.5 update and clicked repair. The update took +5 hours, figured it got stuck. So I cancelled it, got stuck cancelling. So I ended the process. Now I started visual studio and TEST is missing, basically my visual studio installation is messed up I think.
Edit: Found the culprit, it was Microsoft Intune Endpoint Protection that was installed on my pc. It basically scanned everything and when visual studio got updated and files were written to the disk, something went wrong and corrupted my install. I turned it off by excluding C:\* from being scanned and ran VS2013.5 update and clicked repair. Everything is fine now.

Deploying Outlook Plugin C#

I developed an outlook plugin using C# and Visual studio Outlook addin template, that retrieves data from databases and generates a report off of the data.
Plugin works perfectly fine on my local machine. But when I distribute the plugin as an executable to the users, it does not work on the user's machine.
Meaning the addin is not checked by default and even if I check it manually, it does not show up on outlook in the addin bar.
I am unable to figure out if its due to the certificates or anything else.Do I need to install any certificates on the users machine ?
Could some one please help me out ?
EDIT
I right click on the solution file in solution explorer and publish to a folder to generate the setup.exe . My other team mate uses the same steps with the same project checked out of perforce and publishes a setup.exe. Now, his plugin works as expected on the user's machine and mine doesnot work (mine works only on my machine). So, I am not able to figure out what the difference is. Because we both are using the same framework (4.0) and VS (VS 2010 premium).It has something to do with the my machine. not sure if I am missing any installation
Did you have a chance to check out the Trust Center settings on the problematic PC? Are the VBA macro settings applied to COM add-ins? Is the Office application configured to load only signed add-ins?
Microsoft Office applications can disable add-ins that behave unexpectedly. If an application does not load your add-in, the application might have hard disabled or soft disabled your add-in.
Hard disabling can occur when an add-in causes the application to close unexpectedly. It might also occur on your development computer if you stop the debugger while the Startup event handler in your add-in is executing.
Soft disabling can occur when an add-in produces an error that does not cause the application to unexpectedly close. For example, an application might soft disable an add-in if it throws an unhandled exception while the Startup event handler is executing.
When you re-enable a soft-disabled add-in, the application immediately attempts to load the add-in. If the problem that initially caused the application to soft disable the add-in has not been fixed, the application will soft disable the add-in again.
Read more about that in the How to: Re-enable an Add-in That Has Been Disabled article.
Also you may find the Troubleshooting COM Add-In load failures article helpful.
Hope the following steps will help you solve this problem. I assume you are using Outlook 2013 or 2010.
Run the deployed setup with administration rights.
If it is not shown under Add-ins, again open the setup folder and double click on the correct .vsto file then select install.
If you can see your add-in among others, and is not functioning, it means your add-in is disabled. To enable it go to File -> Slow and Disabled Add-ins, and you should see your add-in on the pop-upped window. Enable it.
Edit:
If your plug-in is shown in Disabled Add-ins try applying the following steps:
Enable your plug-in by File -> Slow and Disabled Add-ins, and you should see your add-in on the pop-upped window. Enable it.
Right click on your add-in bar and select Customize the Ribbon.
Then on the pop-upped window, choose All Commands from the left hand side combo box. You should be able to find your command in the list box.
When you find your command click on the Add button between the lists. This will add your command to the chosen category on the right hand-side list. Then click OK.
Your command should appear under the chosen tab.
How are you deploying the add-in? You need to be sure you have configured the installations settings so when you execute the installer MS Outlook knows were to find it and all of its installations components.
In my example I am using MS Project, Visual Studio 2012 with Install Shield.
Below is an example of the registry settings I use for my add-in. You will notice I have configured the manifest to point to installation directory and points to vstolocal.
You will also need to add your .vsto file to your build when constructing the installer.

There are no usable controls in this group. Drag an item onto this text to add it to the toolbox" Visual Studio 2012

Its Not a Programming Question But about Visual studio express 2012.
Trying to create a new report in the visual studio 2012 but can not see the list of data sets, parameters etc: In general tab i am seeing this
"There are no usable controls in this group. Drag an item onto this text to add it to the toolbox"
I have searched to fixed it but not succeeded till now..
I came across this same issue today and read plenty of things such as "this is VS bug...." but the solution was much simpler than that, I just needed to stop debugging (Shift+F5).
If that doesn't work, I recommend restarting the IDE.
If this doesn't work, I guess that uninstalling VS and doing a fresh installation is the answer you're looking for. It's important to note that it's recommended to restart Windows after installing VS and before launching it.
Right click on the Toolbox and press "Show All"
Right click on Toolbox, Click on "choose Items.". Restart IDE. That worked for me.
Right click on Toolbar and select: Reset Toolbox.
MFC controls will reappear.
I also had this problem, and it turned out I was trying to open the wrong toolbox: what I was actually looking for was the 'SSIS toolbox'. If none of the other options have worked, try selecting View -> Other Windows -> SSIS Toolbox. That fixed it for me.
[I found this out from this blog by James Serra]
In VS 2015, the SSIS Toolbox is under SSIS tab, not under View.
"There are no usable controls..." is shown when you have currently opened a file that is not designer file (e.g. "Form1.cs"). Once you open the designer file (e.g. "Form1.Designer.cs") the items should be shown again.
Just hover over the design and then press escape. A control that you had selected and not dropped is holding up memory.
This happened to me, and it was because I was currently debugging. Once I ended debugging, the usable controls appeared.

Excel Add In's Custom Ribbon Tab Will Not Display

I've created an application level add-in for Excel to automate some tasks. I used the VS2012 template Visual C# > Office > 2010 > Excel 2010 Add-In.
Rather than having an action pane open every time Excel does, I've opted to create a custom ribbon tab following these instructions:
http://msdn.microsoft.com/en-us/library/vstudio/bb386104.aspx
However, when I build my project, the tab does not display. I have verified the add-in is loading, and all of its features function properly, except the Ribbon. I created a simple form to test this, which loads as expected.
I then tried creating an Excel 2010 Workbook project. After adding the Ribbon (using the same steps as before) and building the project, it simply works; the ribbon tab appears as expected.
I've tried overriding ThisAddIn.CreateRibbonExtensibilityObject() to return my ribbon object, created via Globals.Factory.GetRibbonFactory().CreateRibbonManager. Again, no dice.
I'm at a loss now.
I also had this problem, where my VSTO ribbon wasn't being displayed.
Here's my solution, using Excel 2013 and VS2015.
What you need to do is:
Open the Ribbon Designer window
Select the RibbonTab object
In the "Properties" window, expand "ControlId" branch, and change the ControlIdType from "Office" to "Custom"
Ridiculous, hey ?
But, strangely, it works...
After much pain, I found that the Position property of the RibbonGroup must be Default.
I had this happen with using the xml ribbon developer tool. You have to add this code (or similar functionality into ThisAddIn.cs (or primary add in class)
protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
{
return new Ribbon1();
}
Default tab's visible property value is False, set it to True.
I switched back to Visual Studio 2017 Community edition and it worked for me.
As an up-gradation process, I'd migrated my VSTO Add-Ins from VS 2017 to VS 2019.
When I compiled my Add-Ins on VS 2019 Community Add-Ins worked well for MS Word and Outlook, but MS Excel was not showing the Add-In (Ribbon)
Tried many suggestions but did not work. After switching back to VS 2017 Community it started working well.

Uninstall MS Word Add-in

I'm in the process of learning how to create add-ins for Microsoft Office Word. I've created a simple Word 2010 Add-In project in Visual Studio 2010 which displays "Hello World" in a message box. Up to this point everything works fine. But if I want to change the message for instance from "Hello World" to "Hi" i get the following error message
System.Deployment.Application.DeploymentException: 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.
After installing the add-in I do the following:
Remove the add-in from Ms Word Options,Add-Ins
Uninstall the add-in from Add Remove Programs
Delete the Normal.dot file
Delete the .vsto in my bin/Debug folder of the project
Once I re-run the project I get the error above.
I really don't know where else can this plug in exist as I think I delete all possible places where any references to it could be found.
I've also tried running RegScanner and deleting all the registry entries pertaining to the add in,yet im getting the same error...
If anyone had this issue before and you know exactly how to solve it and what could be causing it please let me know!
I discovered that if you modify any code in a MS Word Add-in in Visual Studio and you want your changes to be updated in MS Word you can do the folowing:
In Visual Studio,change the version number in Project Name\Properties\Publish\Publish Properties.
Once the version number has been changed (e.g 1 0 0 1) rebuild the project in Visual Studio.
Navigate to ProjectFolder\bin\Debug and double click the .vsto file, voila! You get the following message - The Microsoft Office customization was successfully updated.If you view the .vsto file with a text editor you can also see that the version number has been changed to a new value,hence an update occurs when you double click the .vsto file.It picks up a new version number and re-installs the add-in and successfully attaches to Word.
If the above is the accepted way to do it, that's fine, but I would still like to know whether there is any way that an add-in can be automatically updated in Word without changing the version number.Simply change code,rebuild project,install.

Categories

Resources