Develop Office Business Applications using Visual Studio
I have previously posted how you can specify various properties for a VSTO solution like the Publisher and Product Names by tweaking a few files in Visual Studio 2008.
With Visual Studio 2010 (Beta 2) you can edit these properties directly through the Publish Page. All Office projects in Visual Studio 2010 now have an Options button on the Publish Page, which allows you to spet these properties.
The Publish Options dialog is similar to the ClickOnce publish options dialog for other types of projects, but this dialog only displays the options applicable to Office projects.
Here is what these properties mean:
Publisher Name – The name of the Publisher as displayed in Programs and Features
Product Name – The name of the Solution as it will show up in the Programs and Features (Add Remove Programs Entry)
Support URL – A URL which End Users can visit to get support for this particular solution. The support URL shows up as a clickable link for the product name during the installation trust prompt.
Solution Name – (Friendly Name) This is the name of the Add-In as it is displayed in the Office Add-ins dialog.
Office Application Description – The description of the Office Add-in as displayed in the Office Add-ins dialog.
Add-in Load Behavior – Specifies whether the add-in should load when the Office Application Starts up or whether it should load on demand when the end user tries to interact with it. By default all add-ins are set to load at startup of the Office Application but if you care about Office startup performance and don’t want your add-in to be running all the time then you should consider loading it on demand.
Andrew Whitechapel has a post on how an Office add-in can be demand loaded using different loadbehavior values. Previously you had manually update the ClickOnce manifests with the appropriate load behavior value. With Visual Studio 2010 you can set the option to load the add-in on demand and the loadbehavior will be automatically set to 16 (connect first time) –> Load the add-in on startup for the first time and then load on demand from then on.
Loading an add-in on demand can help improve the startup performance of the Office application. It can also reduce the application’s working set as the add-in is not loaded in memory until the end user interacts with it. Setting the add-in to demand load is a good option if your add-in has UI based triggers, like a Ribbon item that the end user can interact with to load the add-in. However demand loading may not be a good option if your add-in is needs to listen to application events like opening a document etc all the time the application is running. So if your add-in doesn’t have to run all the time, then setting it to Load on Demand is a good option to consider.
Lastly, there is an interesting side note for those of you who may have changed their VS 2008 based project files based on my previous post. If you updated the project file using the same property names as that mentioned in the post, you can migrate that project to VS 2010 and continue using those property values. You no longer need the custom targets file as that functionality is now directly available in the Visual Studio common targets.
For more information, see Publishing Office Solutions.
Have fun with Visual Studio 2010 Beta2 and let us know your feedback!
We are trying this in VS 2012 Premium, Product name and Description is displayed correctly in add-ins dialog but Publisher shows <None>. Can you please reply.
Unfortunately showing the publisher name in the add-ins dialog for VSTO solutions is still not supported. The publisher name only shows up for COM Add-ins.
Its highly unlikely this will change. Since VSTO has its own security/signing which is different from the traditional COM addins the publisher name in the COM addins dialog isn’t populated. The publisher name on the trust prompt when you install the add-in is the main location where it gets displayed to the user and must be trusted in order to run. The publisher name in the COM Addins is merely a string and doesn’t affect the VSTO addins security.
I follow your articles. these are well explained.
I have a situation where ProductName is different from Friendly Name. Everything is working fine.
On updating , the Update Dialog appears which has Name: and it displays ProductName as well as Friendly Name. Is there something I can change to display any one?