<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Office Development with Visual Studio : Deployment</title><link>http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx</link><description>Tags: Deployment</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Visual Studio 2010: Specify advanced publishing options (Saurabh Bhatia)</title><link>http://blogs.msdn.com/vsto/archive/2009/10/19/visual-studio-2010-specify-advanced-publishing-options-saurabh-bhatia.aspx</link><pubDate>Mon, 19 Oct 2009 22:31:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9909491</guid><dc:creator>VSTO Team</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9909491.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9909491</wfw:commentRss><description>&lt;p&gt;I have previously &lt;a href="http://blogs.msdn.com/vsto/archive/2008/06/11/specify-a-product-name-publisher-name-and-other-properties-for-vsto-solutions-saurabh-bhatia.aspx"&gt;posted&lt;/a&gt; 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.&lt;/p&gt;  &lt;p&gt;With Visual Studio 2010 (&lt;a href="http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx"&gt;Beta 2&lt;/a&gt;) you can edit these properties directly through the Publish Page. All Office projects in Visual Studio 2010 now have an &lt;strong&gt;Options&lt;/strong&gt; button on the Publish Page, which allows you to spet these properties.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/VisualStudio2010Beta2Specifyadvancedpubl_128C7/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/VisualStudio2010Beta2Specifyadvancedpubl_128C7/image_thumb.png" width="555" height="387" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;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.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/VisualStudio2010Beta2Specifyadvancedpubl_128C7/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/VisualStudio2010Beta2Specifyadvancedpubl_128C7/image_thumb_1.png" width="591" height="337" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Here is what these properties mean:&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Publisher Name&lt;/b&gt; – The name of the Publisher as displayed in Programs and Features&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Product Name&lt;/b&gt; – The name of the Solution as it will show up in the Programs and Features (Add Remove Programs Entry)&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Support URL&lt;/b&gt; – 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.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/VisualStudio2010Beta2Specifyadvancedpubl_128C7/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/VisualStudio2010Beta2Specifyadvancedpubl_128C7/image_thumb_2.png" width="591" height="338" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Solution Name&lt;/b&gt; – (Friendly Name) This is the name of the Add-In as it is displayed in the Office Add-ins dialog. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Office Application Description&lt;/b&gt; – The description of the Office Add-in as displayed in the Office Add-ins dialog.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Add-in Load Behavior – &lt;/strong&gt;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.&lt;/p&gt;  &lt;p&gt;Andrew Whitechapel has a &lt;a href="http://blogs.msdn.com/andreww/archive/2008/07/14/demand-loading-vsto-add-ins.aspx"&gt;post&lt;/a&gt; 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 (&lt;a href="http://blogs.msdn.com/andreww/archive/2008/04/19/delay-loading-the-clr-in-office-add-ins.aspx"&gt;connect first time&lt;/a&gt;) –&amp;gt; Load the add-in on startup for the first time and then load on demand from then on.&lt;/p&gt;  &lt;p&gt;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. &lt;/p&gt;  &lt;p&gt;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.&lt;/p&gt;  &lt;p&gt;For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/bb608591(VS.100).aspx"&gt;Publishing Office Solutions&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Have fun with &lt;a href="http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx"&gt;Visual Studio 2010 Beta2&lt;/a&gt; and let us know your &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/category/VSPreRelease,netdevelopmentprerelease,visualstudioprerelease,vstsprerelease"&gt;feedback&lt;/a&gt;!&lt;/p&gt;  &lt;p&gt;Saurabh &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9909491" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Manifest/default.aspx">Manifest</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Saurabh+Bhatia/default.aspx">Saurabh Bhatia</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Publisher+Name/default.aspx">Publisher Name</category><category domain="http://blogs.msdn.com/vsto/archive/tags/SupportUrl/default.aspx">SupportUrl</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Product+Name/default.aspx">Product Name</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Add+Remove+Programs/default.aspx">Add Remove Programs</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+Addin+Properties/default.aspx">Office Addin Properties</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Programs+and+Features/default.aspx">Programs and Features</category><category domain="http://blogs.msdn.com/vsto/archive/tags/add-ins/default.aspx">add-ins</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Visual+Studio+2010/default.aspx">Visual Studio 2010</category></item><item><title>Can I deploy my &lt;Insert App Name Here&gt; and all of its prerequisites in one file? (Mary Lee)</title><link>http://blogs.msdn.com/vsto/archive/2009/10/14/can-i-deploy-my-insert-app-name-here-and-all-of-its-prerequisites-in-one-file-mary-lee.aspx</link><pubDate>Wed, 14 Oct 2009 22:16:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9907343</guid><dc:creator>VSTO Team</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9907343.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9907343</wfw:commentRss><description>&lt;p&gt;One frequent customer question is about how to deploy an application and all of its prerequisites in a single .msi or .exe file. This question applies whether you are deploying any of the following:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Microsoft Office 2003 solutions with dependencies on .NET Framework 2.0, Visual Studio Tools for Office 2005 SE runtime, Microsoft Office 2007 primary interop assemblies. &lt;/li&gt;    &lt;li&gt;Microsoft Office 2007 solutions with dependencies on .NET Framework 3.5 , Visual Studio Tools for Office runtime 3.0, Microsoft Office 2007 primary interop assemblies. &lt;/li&gt;    &lt;li&gt;Microsoft Office 2007 solutions with dependencies on .NET Framework 3.5 SP1, Visual Studio Tools for Office runtime 3.0 SP1, Microsoft Office 2007 primary interop assemblies. &lt;/li&gt;    &lt;li&gt;Microsoft Office 2007 solutions with dependencies on .NET Framework 3.5 SP1 Client Profile, Visual Studio Tools for Office runtime 3.0 SP1, Microsoft Office 2007 primary interop assemblies. &lt;/li&gt;    &lt;li&gt;Really, any WinForms/WPF/console/whatever app with dependencies on .NET Framework, SQL Server Express, SQL Server compact, Visual C++ runtime, Windows Installer, or anything else. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;There are three concepts in deployment related to prerequisites: nesting, merging, and chaining or bootstrapping.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Nesting&lt;/strong&gt; is the process of embedding a Windows Installer file (.msi) within another .msi file. However, the &lt;a href="http://support.microsoft.com/kb/306439"&gt;How to create a nested .msi package&lt;/a&gt; article has an important disclaimer.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/CanIdeploymyInsertAppNameHereandallofits_8404/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/CanIdeploymyInsertAppNameHereandallofits_8404/image_thumb.png" width="555" height="80" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The drawbacks of creating a nested MSI installation are listed in the same article.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Nested Installations cannot share components. &lt;/li&gt;    &lt;li&gt;An administrative installation cannot contain a nested installation. &lt;/li&gt;    &lt;li&gt;Patching and upgrading will not work with nested installations. &lt;/li&gt;    &lt;li&gt;The installer will not correctly cost a nested installation. &lt;/li&gt;    &lt;li&gt;Integrated ProgressBars cannot be used with nested installations. &lt;/li&gt;    &lt;li&gt;Resources that are to be advertised cannot be installed by the nested installation. &lt;/li&gt;    &lt;li&gt;A package that performs a nested installation of an application should also uninstall the nested application when the parent product is uninstalled. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For these reasons, nesting is no longer supported. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Merging&lt;/strong&gt; includes shared code, files, resources, registry entries, and setup logic to applications as a single compound file. Prerequisites available as a merge module (.msm) form can be added to a .msi file. For example, if a prerequisite is available as an .msm, you can add it to a Setup project in Visual Studio as shown in &lt;a href="http://msdn.microsoft.com/en-us/library/z6z02ts5(VS.100).aspx"&gt;How to: Create or Add a Merge Module Project&lt;/a&gt;. However, merge modules cannot be serviced by the same owner as the .msi file, so it is difficult to fix issues in the merge module. &lt;a href="http://blogs.msdn.com/windows_installer_team/archive/2006/06/27/648447.aspx"&gt;Tao of the Windows Installer, Part 4&lt;/a&gt; lists two cautionary notes:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Do not consume merge modules of vendors who do not promise to fix their merge modules promptly when bugs arrive &lt;/li&gt;    &lt;li&gt;Be prepared to handle the heat when bugs are found in your merge module causing issues for others’ products that have consumed your merge module and you get to put out the flame &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For these reasons, using merge modules is not recommended.&lt;/p&gt;  &lt;p&gt;Nesting and merging create a single file to deploy an application and its prerequisites, but these methods are not supported and not recommended. Thus, the answer to the question in the title is no: you cannot or should not deploy an application and its prerequisites in one file. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Chaining&lt;/strong&gt; or &lt;strong&gt;bootstrapping&lt;/strong&gt; is the process of checking for and installing missing prerequisites, including installing the application that is going to be used to install the rest of the prerequisites and application. You can use Visual Studio to generate a chainer/bootstrapper that is called Setup.exe. This program checks for and installs missing prerequisites before installing the application or Office solution. &lt;/p&gt;  &lt;p&gt;If you are deploying an Office 2007 solution in Visual Studio 2008 SP1, the .NET Framework 3.5 SP1, Visual Studio Tools for Office 3.0 SP1 runtime, and Microsoft Office 2007 primary interop assemblies are already selected in the Prerequisites Dialog Box.&lt;/p&gt;  &lt;p&gt;To learn more about how to install prerequisites in Visual Studio, see the following topics.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb608608(VS.100).aspx"&gt;How to: Install Prerequisites on End User Computers to Run Office Solutions&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/7eh4aaa5(VS.100).aspx"&gt;How to: Install Prerequisites in Windows Installer Deployment&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/8st7th1x(VS.100).aspx"&gt;How to: Install Prerequisites with a ClickOnce Application&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If the prerequisite package does not appear in Visual Studio, you can create your own bootstrapper package. After you create a product.xml file that describes the prerequisite and a package.xml files that includes locale-specific error messages, you can copy the bootstrapper package to \Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages folder. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/ms165429(VS.100).aspx"&gt;Creating Bootstrapper Packages&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Other tools besides Visual Studio: You can also use MSBuild and the &lt;a href="http://msdn.microsoft.com/en-us/library/ms164294.aspx"&gt;GenerateBootstrapper Task&lt;/a&gt; to create a bootstrapper on a build computer. Alternatively, you can use the Windows Installer XML Toolset to generate .msi files and package prerequisites. For more information, see &lt;a title="http://wix.sourceforge.net/" href="http://wix.sourceforge.net/"&gt;http://wix.sourceforge.net/&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;For questions about bootstrapping, search for answers or post new questions in the &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/winformssetup/threads"&gt;ClickOnce and Setup &amp;amp; Deployment forum&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Happy deployment!&lt;/p&gt;  &lt;p&gt;Mary Lee, Programming Writer.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9907343" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/Mary+Lee/default.aspx">Mary Lee</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Windows+Installer/default.aspx">Windows Installer</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.msdn.com/vsto/archive/tags/primary+interop+assemblies/default.aspx">primary interop assemblies</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Bootstrapper/default.aspx">Bootstrapper</category></item><item><title>Use a path that resolves anywhere your VSTO solution could be deployed (Christin Boyd)</title><link>http://blogs.msdn.com/vsto/archive/2009/06/04/use-a-path-that-resolves-anywhere-your-vsto-solution-could-be-deployed-christin-boyd.aspx</link><pubDate>Thu, 04 Jun 2009 23:29:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9700238</guid><dc:creator>VSTO Team</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9700238.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9700238</wfw:commentRss><description>&lt;p&gt;One of the VSTO MVPs pointed out that in some cases his customers were unable to resolve UNC paths consistently.&amp;#160; When he investigated further, he found that some branch offices of an enterprise were unable to resolve the UNC path (&lt;a href="file://\\myserver\myvstoapps\installpath\"&gt;\\myserver\myvstoapps\installpath\&lt;/a&gt;) because of the way they setup their network infrastructure.&amp;#160; The only workaround he could find was to use a fully qualified web URL instead of a UNC path.&amp;#160; The resolution was to create a web server internal to the corporation which is still accessible by people in the branch office.&amp;#160; The other option would be to negotiate with the IT staff to change the way the branch office resolves server names, but apparently that was not an option.&lt;/p&gt;  &lt;p&gt;We looked at the situation and agree with his conclusion about the workaround.&amp;#160; If the network just won’t give you the correct path using UNC, then HTTP is a reliable solution.&lt;/p&gt;  &lt;p&gt;-Christin Boyd, Program Manager&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9700238" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Christin+Boyd/default.aspx">Christin Boyd</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx">Deployment</category></item><item><title>Copying a Document to the End User Computer after a ClickOnce Installation (Mary Lee)</title><link>http://blogs.msdn.com/vsto/archive/2009/05/21/copying-a-document-to-the-end-user-computer-after-a-clickonce-installation.aspx</link><pubDate>Thu, 21 May 2009 20:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9625637</guid><dc:creator>VSTO Team</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9625637.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9625637</wfw:commentRss><description>&lt;p&gt;Starting in Visual Studio 2010 Beta 1, you can perform additional tasks after an Office solution is installed known as a post-deployment action. For example, you can copy a customized Office document and create registry keys on the end user computer. You can compare these to Windows Installer custom actions.&lt;/p&gt;  &lt;p&gt;The Visual Studio Tools for Office runtime supports the ability to perform post-deployment actions after an Office solution is installed. However, Visual Studio does not generate the necessary sections of the ClickOnce application and deployment manifests to perform these actions. To run these post-deployment actions, you must modify the application and deployment manifests. This process is demonstrated in the &lt;a href="http://msdn.microsoft.com/en-us/library/dd465291(VS.100).aspx"&gt;Walkthrough: Copying a Document to the End User Computer after a ClickOnce Installation&lt;/a&gt; topic in the &lt;a href="http://msdn.com"&gt;MSDN Library&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;The walkthrough uses an Excel workbook project, but this example uses a Word document project for demonstration purposes.&lt;/p&gt;  &lt;h4&gt;Creating a New Project&lt;/h4&gt;  &lt;p&gt;1. Create a new Word document-level project that targets the .NET Framework 3.5 named FabrikamWordDocument.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/CopyingaDocumenttotheEndUserComputerafte_9831/image_4.png"&gt;&lt;img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="448" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/CopyingaDocumenttotheEndUserComputerafte_9831/image_thumb_1.png" width="646" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;2. Add code to the FabrikamWordDocument project.&lt;/p&gt;  &lt;p&gt;3. Build the project.&lt;/p&gt;  &lt;h4&gt;Creating a Class Library Project that Defines the Post-Deployment Action&lt;/h4&gt;  &lt;p&gt;1. Create a class library called FileCopyPDA.&lt;/p&gt;  &lt;p&gt;2. Add references to Microsoft.VisualStudio.Tools.Applications.Runtime.v10.0 and Microsoft.VisualStudio.ToolsApplications.ServerDocument.v10.0.&lt;/p&gt;  &lt;p&gt;3. Rename the class to FileCopyPDA.&lt;/p&gt;  &lt;p&gt;4. Replace the FileCopyPDA class with the following code that completes the following tasks:&lt;/p&gt;  &lt;li&gt;   &lt;p&gt;Copies the Word document file to the user's desktop if the solution is installed or updated.&lt;/p&gt; &lt;/li&gt;  &lt;li&gt;   &lt;p&gt;Changes the &lt;strong&gt;_AssemblyLocation&lt;/strong&gt; property from a relative path to a fully qualified path for the deployment manifest. This is done using the AddCustomization and RemoveCustomization methods.&lt;/p&gt; &lt;/li&gt;  &lt;li&gt;   &lt;p&gt;Deletes the file if the solution is uninstalled.&lt;/p&gt; &lt;/li&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Public Class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;FileCopyPDA
    &lt;/span&gt;&lt;span style="color: blue"&gt;Implements &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IAddInPostDeploymentAction

    &lt;/span&gt;&lt;span style="color: blue"&gt;Sub &lt;/span&gt;Execute(&lt;span style="color: blue"&gt;ByVal &lt;/span&gt;args &lt;span style="color: blue"&gt;As &lt;/span&gt;&lt;span style="color: #2b91af"&gt;AddInPostDeploymentActionArgs&lt;/span&gt;) &lt;span style="color: blue"&gt;Implements &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IAddInPostDeploymentAction&lt;/span&gt;.Execute
        &lt;span style="color: blue"&gt;Dim &lt;/span&gt;dataDirectory &lt;span style="color: blue"&gt;As String &lt;/span&gt;= &lt;span style="color: #a31515"&gt;&amp;quot;Data\FabrikamWordDocument.docx&amp;quot;
        &lt;/span&gt;&lt;span style="color: blue"&gt;Dim &lt;/span&gt;file &lt;span style="color: blue"&gt;As String &lt;/span&gt;= &lt;span style="color: #a31515"&gt;&amp;quot;FabrikamWordDocument.docx&amp;quot;
        &lt;/span&gt;&lt;span style="color: blue"&gt;Dim &lt;/span&gt;sourcePath &lt;span style="color: blue"&gt;As String &lt;/span&gt;= args.AddInPath
        &lt;span style="color: blue"&gt;Dim &lt;/span&gt;deploymentManifestUri &lt;span style="color: blue"&gt;As &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Uri &lt;/span&gt;= args.ManifestLocation
        &lt;span style="color: blue"&gt;Dim &lt;/span&gt;destPath &lt;span style="color: blue"&gt;As String &lt;/span&gt;= &lt;span style="color: #2b91af"&gt;Environment&lt;/span&gt;.GetFolderPath(Environment.&lt;span style="color: #2b91af"&gt;SpecialFolder&lt;/span&gt;.DesktopDirectory)
        &lt;span style="color: blue"&gt;Dim &lt;/span&gt;sourceFile &lt;span style="color: blue"&gt;As String &lt;/span&gt;= System.IO.&lt;span style="color: #2b91af"&gt;Path&lt;/span&gt;.Combine(sourcePath, dataDirectory)
        &lt;span style="color: blue"&gt;Dim &lt;/span&gt;destFile &lt;span style="color: blue"&gt;As String &lt;/span&gt;= System.IO.&lt;span style="color: #2b91af"&gt;Path&lt;/span&gt;.Combine(destPath, file)

        &lt;span style="color: blue"&gt;Select Case &lt;/span&gt;args.InstallationStatus
            &lt;span style="color: blue"&gt;Case &lt;/span&gt;&lt;span style="color: #2b91af"&gt;AddInInstallationStatus&lt;/span&gt;.InitialInstall, &lt;span style="color: #2b91af"&gt;AddInInstallationStatus&lt;/span&gt;.Update
                &lt;span style="color: #2b91af"&gt;File&lt;/span&gt;.Copy(sourceFile, destFile)
                &lt;span style="color: #2b91af"&gt;ServerDocument&lt;/span&gt;.RemoveCustomization(destFile)
                &lt;span style="color: #2b91af"&gt;ServerDocument&lt;/span&gt;.AddCustomization(destFile, deploymentManifestUri)
                &lt;span style="color: blue"&gt;Exit Select
            Case &lt;/span&gt;&lt;span style="color: #2b91af"&gt;AddInInstallationStatus&lt;/span&gt;.Uninstall
                &lt;span style="color: blue"&gt;If &lt;/span&gt;&lt;span style="color: #2b91af"&gt;File&lt;/span&gt;.Exists(destFile) &lt;span style="color: blue"&gt;Then
                    &lt;/span&gt;&lt;span style="color: #2b91af"&gt;File&lt;/span&gt;.Delete(destFile)
                &lt;span style="color: blue"&gt;End If
                Exit Select
        End Select
    End Sub

End Class&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;5. Build the FileCopyPDA project.&lt;/p&gt;

&lt;p&gt;6. Add a reference to FileCopyPDA.dll in the FabrikamWordDocument project.&lt;/p&gt;

&lt;p&gt;7. Create a directory called “Data” in the FabrikamWordDocument project.&lt;/p&gt;

&lt;p&gt;8. Add the FabrikamWordDocument.docx file to the Data folder.&lt;/p&gt;

&lt;p&gt;9. In Properties window for the FabrikamWordDocument.docx file, change the &lt;strong&gt;Build&lt;/strong&gt; &lt;strong&gt;Action&lt;/strong&gt; property to &lt;strong&gt;Content&lt;/strong&gt;, and change the &lt;strong&gt;Copy to Output Directory&lt;/strong&gt; property to &lt;strong&gt;Copy if newer&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;10. Publish the FabrikamWordDocument project. This example uses the c:\publish directory.&lt;/p&gt;

&lt;h4&gt;Modifying the Application Manifest&lt;/h4&gt;

&lt;p&gt;1. Open the C:\publish\Application Files\FabrikamWordDocument_1_0_0_0\FabrikamWordDocument.dll.manifest file in the XML Editor in Visual Studio.&lt;/p&gt;

&lt;p&gt;2. Add the following XML code after the &lt;font face="courier new"&gt;&amp;lt;/vstav3:update&amp;gt;&lt;/font&gt; element to run the FileCopy post-deployment action.&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;vstav3:postActions&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;vstav3:postAction&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;vstav3:entryPoint
      &lt;/span&gt;&lt;span style="color: red"&gt;class&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;FileCopyPDA.FileCopyPDA&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;
      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;assemblyIdentity
        &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;FileCopyPDA&lt;/span&gt;&amp;quot;
        &lt;span style="color: red"&gt;version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;1.0.0.0&lt;/span&gt;&amp;quot;
        &lt;span style="color: red"&gt;language&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;neutral&lt;/span&gt;&amp;quot;
        &lt;span style="color: red"&gt;processorArchitecture&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;msil&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;vstav3:entryPoint&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;vstav3:postActionData&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;vstav3:postActionData&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;vstav3:postAction&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;vstav3:postActions&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;h4&gt;Re-signing the Manifests&lt;/h4&gt;

&lt;p&gt;To prove that yes, you really meant to make these changes to the application manifest, you must re-sign the application manifest with a certificate. Then, re-sign and update the deployment manifest to point to the new application manifest.&lt;/p&gt;

&lt;p&gt;1. Copy your certificate to the C:\publish\Application Files\FabrikamWordDocument_1_0_0_0 directory. In this example, I’m reusing the temporary certificate created by Visual Studio because I’ll be installing this to a test computer. For production deployment, we recommend that you use a certificate obtained from a certificate authority.&lt;/p&gt;

&lt;p&gt;2. In a Visual Studio command prompt, change to the C:\publish\Application Files\FabrikamWordDocument_1_0_0_0 directory. (You may have to open the command prompt in Administrator mode to re-sign the files in the c:\publish directory.)&lt;/p&gt;

&lt;p&gt;3. Re-sign the application manifest with the following command:&lt;/p&gt;

&lt;pre&gt;mage -sign FabrikamWordDocument.dll.manifest -certfile FabrikamWordDocument_TemporaryKey.pfx&lt;/pre&gt;

&lt;p&gt;4. Change to the c:\publish directory&lt;/p&gt;

&lt;p&gt;5. Re-sign the deployment manifest with the following command (on one line):&lt;/p&gt;

&lt;pre&gt;mage -update FabrikamWordDocument.vsto &lt;/pre&gt;

&lt;pre&gt;–appmanifest &amp;quot;Application Files\FabrikamWordDocument_1_0_0_0\FabrikamWordDocument.dll.manifest&amp;quot; &lt;/pre&gt;

&lt;pre&gt;-certfile &amp;quot;Application Files\FabrikamWordDocument_1_0_0_0\FabrikamWordDocument_TemporaryKey.pfx&amp;quot;&lt;/pre&gt;

&lt;p&gt;6. Copy the c:\publish\FabrikamWordDocument.vsto file to the c:\publish\Application Files\FabrikamWordDocument_1_0_0_0 directory.&lt;/p&gt;

&lt;h4&gt;Testing the Installer&lt;/h4&gt;

&lt;p&gt;1. Copy the c:\publish directory to a test computer.&lt;/p&gt;

&lt;p&gt;2. In the c:\publish directory, run the Setup.exe file or double-click FabrikamWordDocument.vsto.&lt;/p&gt;

&lt;p&gt;3. Verify that FabrikamWordDocument appears in the Add/Remove Programs list in Windows XP or Programs and Features in Windows Vista.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/CopyingaDocumenttotheEndUserComputerafte_9831/image_5.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="73" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/CopyingaDocumenttotheEndUserComputerafte_9831/image_thumb.png" width="554" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;4. Verify that the FabrikamWordDocument.docx file appears on the desktop.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/CopyingaDocumenttotheEndUserComputerafte_9831/image_7.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="204" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/CopyingaDocumenttotheEndUserComputerafte_9831/image_thumb_2.png" width="102" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;5. Open the Word document file to verify that your code is running.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Feel free to leave comments and feedback about this new scenario at the bottom of this article.&lt;/p&gt;

&lt;p&gt;Happy deployment!&lt;/p&gt;

&lt;p&gt;Mary Lee, Programming Writer.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9625637" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Mary+Lee/default.aspx">Mary Lee</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2010/default.aspx">VS2010</category></item><item><title>Deploying Multiple Office Solutions In a Single Installer (Mary Lee)</title><link>http://blogs.msdn.com/vsto/archive/2009/05/20/deploying-multiple-office-solutions-in-a-single-installer.aspx</link><pubDate>Wed, 20 May 2009 20:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9625617</guid><dc:creator>VSTO Team</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9625617.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9625617</wfw:commentRss><description>&lt;P&gt;Starting in Visual Studio 2010 Beta 1, you can deploy multiple Office solutions in a single ClickOnce installer. For example, you can develop two Office solutions (one for Outlook and another for Excel) and combine these into a single installer with a single entry in the Add/Remove Programs list in Windows XP and the Programs and Features list in Windows Vista.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_21.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_21.png"&gt;&lt;IMG title=image style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=150 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb_1.png" width=627 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;The Visual Studio Tools for Office runtime supports the ability to deploy multiple Office solutions in a single installer. However, Visual Studio still generates the ClickOnce application and deployment manifests for individual deployment. To deploy multiple Office solutions in a single installer, you must modify the application and deployment manifests to install multiple assemblies. This process is demonstrated in the &lt;A href="http://msdn.microsoft.com/en-us/library/dd465290(VS.100).aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd465290(VS.100).aspx"&gt;Walkthrough: Deploying Multiple Office Solutions in a Single ClickOnce Installer&lt;/A&gt; topic in the &lt;A href="http://msdn.com/" mce_href="http://msdn.com"&gt;MSDN Library&lt;/A&gt;. &lt;/P&gt;
&lt;H4&gt;Creating Multiple Office Solutions&lt;/H4&gt;
&lt;P&gt;To continue the example mentioned in the introduction, you can develop an Excel workbook project and an Outlook add-in project for .NET Framework 3.5. Then, to deploy both of these, create an installer project, which you can re-use later to add a third or fourth project. By keeping this installer project separate, it’s possible to keep the original files for the individual projects intact. In this example, the installer project is based on a Word document project, but the document isn’t being deployed. The following figure shows Solution Explorer with three projects, one installer project and two projects to deploy to end user computers.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_10.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_10.png"&gt;&lt;IMG title=image style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=370 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb_4.png" width=285 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb_4.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;Publishing the Office Solutions&lt;/H4&gt;
&lt;P&gt;After you add your code to the Excel and Outlook projects, publish the ContosoExcelWorkbook, ContosoOutlookAddIn, and then ContosoInstaller projects (in that order) to a folder on the development computer. You can right-click on the projects in &lt;STRONG&gt;Solution Explorer&lt;/STRONG&gt;, and then click &lt;STRONG&gt;Publish&lt;/STRONG&gt;. In this example, the publish directory is c:\publish.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_6.png"&gt;&lt;IMG title=image style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=113 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb_2.png" width=244 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;H4&gt;Modifying the Application Manifest&lt;/H4&gt;
&lt;P&gt;Visual Studio generates an application manifest and deployment manifest for each project. The ClickOnce application manifest is a description of all the files included in the project. Additionally, this file describes how the Office application could load the assembly and run your code. By modifying the application manifest, you can describe files from multiple projects and install all specified projects. There are three different sections of the application manifest to modify: install dependencies, entry points, and assemblies.&lt;/P&gt;
&lt;P&gt;These changes may appear lengthy, but it really amounts to a few copy-paste operations and adding four words to the application manifest.&lt;/P&gt;
&lt;H5&gt;Adding the Install Dependencies&lt;/H5&gt;
&lt;P&gt;1. In the c:\publish\Application Files folder, copy the contents of the ContosoExcelWork_1_0_0_0 and ContosoOutlookAddIn_1_0_0_0 folder into the ContosoInstaller_1_0_0_0 folder.&lt;/P&gt;
&lt;P&gt;2. From the c:\publish\Application Files\ContosoInstaller_1_0_0_0 folder, open the three .dll.manifest files in the XML editor in Visual Studio.&lt;/P&gt;
&lt;P&gt;3. Copy the &lt;FONT face="courier new"&gt;&amp;lt;dependency&amp;gt;&lt;/FONT&gt; block for the Office customization assembly from the ContosoOutlookAddIn.dll.manifest and ContosoExcelWorkbook.dll.manifest files into the ContosoInstaller.dll.manifest file. This code specifies that the ContosoOutlookAddIn.dll and ContosoExcelWorkbook.dll files are part of the ContosoInstaller project.&lt;/P&gt;
&lt;P&gt;4. Delete the &lt;FONT face="courier new"&gt;&amp;lt;dependency&amp;gt;&lt;/FONT&gt; block for the ContosoInstaller.dll. This file is not part of the project, because you are only using the ContosoInstaller project to generate the application manifest template.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_8.png"&gt;&lt;IMG title=image style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=758 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb_3.png" width=864 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H5&gt;Adding the Entry Points&lt;/H5&gt;
&lt;P&gt;1. In the ContosoInstaller.dll.manifest file, delete the text between the &lt;FONT face="courier new"&gt;&amp;lt;vstav3:entryPointsCollection&amp;gt;&lt;/FONT&gt; and &lt;FONT face="courier new"&gt;&amp;lt;/vstav3:entryPointsCollection&amp;gt;&lt;/FONT&gt; elements.&lt;/P&gt;
&lt;P&gt;2. In the ContosoOutlookAddIn.dll.manifest and ContosoExcelWorkbook.dll.manifest files, copy the text between the &lt;FONT face="courier new"&gt;&amp;lt;vstav3:entryPointsCollection&amp;gt;&lt;/FONT&gt; and &lt;FONT face="courier new"&gt;&amp;lt;/vstav3:entryPointsCollection&amp;gt;&lt;/FONT&gt; elements and paste them into the ContosoInstaller.dll.manifest file.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_12.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_12.png"&gt;&lt;IMG title=image style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=503 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb_5.png" width=871 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb_5.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;3. Add an id to the &lt;FONT face="courier new"&gt;&amp;lt;vstav3:entryPoints&amp;gt;&lt;/FONT&gt; elements.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_18.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_18.png"&gt;&lt;IMG title=image style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=310 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb_8.png" width=763 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb_8.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;H5&gt;Adding the assemblies&lt;/H5&gt;
&lt;P&gt;1. In the ContosoInstaller.dll.manifest file, delete the text between the &lt;FONT face="Courier New"&gt;&amp;lt;vstov4:customizations xmlns:vstov4="urn:schemas-microsoft-com:vsto.v4"&amp;gt;&lt;/FONT&gt; and &lt;FONT face="courier new"&gt;&amp;lt;/vstov4:customizations&amp;gt;&lt;/FONT&gt; elements.&lt;/P&gt;
&lt;P&gt;2. In the ContosoOutlookAddIn.dll.manifest and ContosoExcelWorkbook.dll.manifest files, copy the &lt;FONT face="Courier New"&gt;&amp;lt;vstov4:customizations xmlns:vstov4="urn:schemas-microsoft-com:vsto.v4"&amp;gt;&lt;/FONT&gt; and &lt;FONT face="courier new"&gt;&amp;lt;/vstov4:customizations&amp;gt;&lt;/FONT&gt; elements and paste them into the ContosoInstaller.dll.manifest file.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_14.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_14.png"&gt;&lt;IMG title=image style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=323 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb_6.png" width=876 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb_6.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;3. Add the id name to the &lt;FONT face="courier new"&gt;&amp;lt;vstov4:customization&amp;gt;&lt;/FONT&gt; elements.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_15.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_15.png"&gt;&lt;IMG title=image style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=172 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb.png" width=656 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;4. Save the changes in the ContosoInstaller.dll.manifest file, and close the ContosoExcelWorkbook.dll.manifest and ContosoOutlookAddIn.dll.manifest files.&lt;/P&gt;
&lt;H4&gt;Re-Signing the Manifests&lt;/H4&gt;
&lt;P&gt;To prove that yes, you really meant to make these changes to the application manifest, you must re-sign the application manifest with a certificate. Then, re-sign and update the deployment manifest to point to the new application manifest.&lt;/P&gt;
&lt;P&gt;1. Copy your certificate to the c:\publish\Application Files\ContosoInstaller_1_0_0_0 directory. In this example, I’m reusing the temporary certificate created by Visual Studio because I’ll be installing this to a test computer. For production deployment, we recommend that you use a certificate obtained from a certificate authority.&lt;/P&gt;
&lt;P&gt;2. In a Visual Studio command prompt, change to the c:\publish\Application Files\ContosoInstaller_1_0_0_0 directory. (You may have to open the command prompt in Administrator mode to re-sign the files in the c:\publish directory.)&lt;/P&gt;
&lt;P&gt;3. Re-sign the application manifest with the following command:&lt;/P&gt;&lt;PRE&gt;mage -sign ContosoInstaller.dll.manifest -certfile ContosoInstaller_TemporaryKey.pfx&lt;/PRE&gt;
&lt;P&gt;4. Change to the c:\publish directory&lt;/P&gt;
&lt;P&gt;5. Re-sign the deployment manifest with the following command (on one line):&lt;/P&gt;&lt;PRE&gt;mage -update ContosoInstaller.vsto &lt;/PRE&gt;&lt;PRE&gt;-appmanifest "Application Files\ContosoInstaller_1_0_0_0\ContosoInstaller.dll.manifest" &lt;/PRE&gt;&lt;PRE&gt;-certfile "Application Files\ContosoInstaller_1_0_0_0\ContosoInstaller_TemporaryKey.pfx"&lt;/PRE&gt;
&lt;P&gt;6. Copy the c:\publish\ContosoInstaller.vsto file to the c:\publish\Application Files\ContosoInstaller_1_0_0_0 directory.&lt;/P&gt;
&lt;H4&gt;Testing the Installer&lt;/H4&gt;
&lt;P mce_keep="true"&gt;1. Copy the c:\publish directory to a test computer.&lt;/P&gt;
&lt;P mce_keep="true"&gt;2. In the publish directory, run the Setup.exe file or double-click ContosoInstaller.vsto.&lt;/P&gt;
&lt;P&gt;3. Verify that ContosoInstaller appears in the Add/Remove Programs list in Windows XP or Programs and Features in Windows Vista.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_21.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_21.png"&gt;&lt;IMG title=image style="BORDER-TOP-WIDTH: 0px; DISPLAY: inline; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=150 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb_1.png" width=627 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingMultipleOfficeSolutionsInaSingl_CF34/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;4. Open the Excel workbook file and Outlook to verify that your code is running.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Feel free to leave comments and feedback about this new scenario at the bottom of this article.&lt;/P&gt;
&lt;P&gt;Happy deployment!&lt;/P&gt;
&lt;P&gt;Mary Lee, Programming Writer.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9625617" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Mary+Lee/default.aspx">Mary Lee</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+2007/default.aspx">Office 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2010/default.aspx">VS2010</category></item><item><title>Issues with installing VSTO projects that were published from Visual Studio 2008 on Windows 7 RC (Saurabh Bhatia)</title><link>http://blogs.msdn.com/vsto/archive/2009/05/07/issues-with-installing-vsto-projects-that-were-published-from-visual-studio-2008-on-windows-7-rc-saurabh-bhatia.aspx</link><pubDate>Thu, 07 May 2009 23:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9594863</guid><dc:creator>VSTO Team</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9594863.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9594863</wfw:commentRss><description>&lt;P&gt;Many customers have reported issues with installing a VSTO project that has been published with Visual Studio 2008 running on the recently released Windows 7 Release Candidate.&lt;/P&gt;
&lt;P&gt;If you published your solution using VS2008 on a machine running the Windows 7 RC and then you try to install the solution on any machine you will see the following error: “The required version of the .NET Framework is not installed on this computer”&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/IssueswithinstallingVSTOprojectsthatwere_BE50/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/IssueswithinstallingVSTOprojectsthatwere_BE50/image_2.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: block; FLOAT: none; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: auto; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: auto" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/IssueswithinstallingVSTOprojectsthatwere_BE50/image_thumb.png" width=421 height=480 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/IssueswithinstallingVSTOprojectsthatwere_BE50/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;You will see this error even if you have the right version of .Net Framework installed. The issue occurs due to some differences in the publishing mechanism on the Windows 7 RC caused by a missing file in the .Net Framework 3.5.1 which was included in the RC.&lt;/P&gt;
&lt;P&gt;The following file is missing:&lt;/P&gt;
&lt;P&gt;&lt;FONT size=3 face=Consolas&gt;%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5\RedistList\FrameworkList.xml&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;You can workaround the issue by manually copying this file from an existing non Windows 7 machine which has the .Net Framework 3.5 installed. The file will be available at the exact same location.&lt;/P&gt;
&lt;P&gt;Once you have included this file on the Windows 7 RC machine, you will be able to publish and generate the correct manifests. After making this change please republish any solutions that were previously published from the Windows 7 RC machine. These solutions will now be able to install successfully.&lt;/P&gt;
&lt;P&gt;We are tracking this issue and plan to address it before Windows 7 RTM. If you are using the RC release please use the workaround mentioned above.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Updates**********&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;If you have having trouble replacing the file. You need to be an Owner of the file and your user account needs Full Control.&amp;nbsp; To do this: &lt;/P&gt;
&lt;P&gt;•&amp;nbsp;&amp;nbsp;&amp;nbsp; Right click the File -&amp;gt; Properties &lt;BR&gt;•&amp;nbsp;&amp;nbsp;&amp;nbsp; Select Security Tab &lt;BR&gt;•&amp;nbsp;&amp;nbsp;&amp;nbsp; Click the Advanced Button &lt;BR&gt;•&amp;nbsp;&amp;nbsp;&amp;nbsp; Click the “Owner” Tab &lt;BR&gt;•&amp;nbsp;&amp;nbsp;&amp;nbsp; Click the Change Button &lt;BR&gt;•&amp;nbsp;&amp;nbsp;&amp;nbsp; Double Click your User Object &lt;BR&gt;•&amp;nbsp;&amp;nbsp;&amp;nbsp; Click Okay &lt;BR&gt;•&amp;nbsp;&amp;nbsp;&amp;nbsp; Click Okay, &lt;BR&gt;•&amp;nbsp;&amp;nbsp;&amp;nbsp; Ensure you have “Full Control” Permissions to the file by repeating steps above and adding your user account with Full Control permissions. &lt;/P&gt;
&lt;P&gt;Also if you are on a 64 bit system:&lt;/P&gt;
&lt;P&gt;Note that you need to replace both the architecture specific files on a 64bit bit OS, i.e. &lt;BR&gt;[Program Files x86]\Reference Assemblies\Microsoft\Framework\v3.5\RedistList &lt;BR&gt;%ProgramFiles%\Reference Assemblies\Microsoft\Framework\v3.5\RedistList&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9594863" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2008/default.aspx">VS2008</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Saurabh+Bhatia/default.aspx">Saurabh Bhatia</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Windows+7+RC/default.aspx">Windows 7 RC</category></item><item><title>Signing and re-signing manifests in ClickOnce (Saurabh Bhatia)</title><link>http://blogs.msdn.com/vsto/archive/2009/04/29/signing-and-re-signing-manifests-in-clickonce.aspx</link><pubDate>Thu, 30 Apr 2009 04:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9577695</guid><dc:creator>VSTO Team</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9577695.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9577695</wfw:commentRss><description>&lt;P&gt;ClickOnce manifest &lt;A&gt;signing &lt;/A&gt;can be a little confusing for someone going through the process the very first time. This is probably because it involves signing multiple files in a particular sequence. Once you understand the process conceptually it becomes fairly easy to follow. In this post, I hope to provide a &lt;A&gt;quick summary of the important things&lt;/A&gt;you need to know about manifests and this signing/resigning business.&lt;/P&gt;
&lt;P&gt;Let’s start with some background info in case you missed it:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;What are these manifests I speak of?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Any application deployed through ClickOnce will have two manifests: a deployment manifest and an application manifest. &lt;/P&gt;
&lt;P&gt;Depending on the type of application, the &lt;STRONG&gt;deployment manifest&lt;/STRONG&gt; can have the following file extensions:&lt;/P&gt;
&lt;P&gt;.application – for any executable application like a Winforms or WPF application&lt;/P&gt;
&lt;P&gt;.vsto – for a VSTO based Office customization solutions (which this blog is all about)&lt;/P&gt;
&lt;P&gt;.&lt;A&gt;xbap &lt;/A&gt;– for a Browser Hosted WPF application&lt;/P&gt;
&lt;P&gt;An &lt;STRONG&gt;application manifest&lt;/STRONG&gt; will always have the .manifest extension. For example:&lt;/P&gt;
&lt;P&gt;.exe.manifest – for any executable including Winforms, WPF and Browser Hosted WPF applications.&lt;/P&gt;
&lt;P&gt;.dll.manifest – for VSTO based office customizations.&lt;/P&gt;
&lt;P&gt;MSDN has documentation that describes these files and their use in detail but for a one line summary – think of these as “Setup Authoring” for your application that tells the application how to install, update, what the application is called etc.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ws1c2fch.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ws1c2fch.aspx"&gt;ClickOnce Application Manifest&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/k26e96zf.aspx" mce_href="http://msdn.microsoft.com/en-us/library/k26e96zf.aspx"&gt;ClickOnce Deployment Manifest&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/bb757477.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb757477.aspx"&gt;Application Manifests for Office Solutions (2007 System)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;So why do manifests have to be signed?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;The ClickOnce “trust model” is based on signing the ClickOnce manifests with a Certificate. By “trust model,” I mean the process by which ClickOnce and the end user can decide whether to trust an application and allow it to install or not. To sign an application, you need a Certificate - Visual Studio will generate a temporary certificate for you when you publish an application (like MyApplication_Temporary.pfx) and also sign the manifests for you. You can also choose to sign the manifests with a code-signing certificate that you can obtain from a Root Certificate Authority.&lt;/P&gt;
&lt;P&gt;These MSDN articles go into details about the certificates and how they are used:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ms172240.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms172240.aspx"&gt;ClickOnce Deployment and Authenticode&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/zfz60ccf.aspx" mce_href="http://msdn.microsoft.com/en-us/library/zfz60ccf.aspx"&gt;Signing ClickOnce Manifests&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Starting with .NET 3.5 SP1, signing has become optional for any .exe-based application. So Winforms/WPF/Console applications deployed via Clickonce no longer need to be signed. The downside of course is that there are no guarantees on the integrity of the application. The developer has to make the choice between the tradeoff of securing the application and going through the signing process vs not signing the application at all and relying on some other means of ensuring the application has not being compromised.&lt;/P&gt;
&lt;P&gt;Note that VSTO solutions still require that the manifests be signed. Most VSTO scenarios are in the enterprise where best practices require signing of applications. Also since VSTO solutions always run full trust there is a higher risk associated with making signing optional. &lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Why do they need to be re-signed?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Visual Studio is capable of generating signed manifests. Why get into this whole re-signing business? Re-signing is needed when you are in a situation where you want to change something about the application after it has already been published – and you want to do so without re-building or re-publishing the application from Visual Studio.&amp;nbsp; You may want to simply sign the application with a different certificate without re-building the application, for example you test the application with a self created test certificate but when you deploy the application to end users it is signed with a code-signing certificate issued by a Certificate Authority. Some of the most common examples that re-quire re-signing are when you want to change a particular file that is part of your application like the .config file, or maybe a simple resource/data file that is deployed along with your application.&lt;/P&gt;
&lt;P&gt;The ClickOnce manifests contain hashes to all the files that are being deployed as part of the application. If any of the files change, then the hash for that file breaks and the signing becomes invalid. So you cannot simply replace an individual file in a ClickOnce package without breaking the signing. You will have to update and re-sign the manifests if you want to update a file.&lt;/P&gt;
&lt;P&gt;The following figures should help illustrate this better.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/ResigningClickOncemanifests101_AC30/clip_image002_2.gif" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/ResigningClickOncemanifests101_AC30/clip_image002_2.gif"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: block; FLOAT: none; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: auto; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: auto" title=clip_image002 border=0 alt=clip_image002 src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/ResigningClickOncemanifests101_AC30/clip_image002_thumb.gif" width=529 height=167 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/ResigningClickOncemanifests101_AC30/clip_image002_thumb.gif"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;A typical ClickOnce deployment package consists of &lt;/P&gt;
&lt;P&gt;· &lt;A&gt;Deployment Manifest&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;· Application Manifest&lt;/P&gt;
&lt;P&gt;· Application Files – the exe and dlls associated with the application. &lt;/P&gt;
&lt;P&gt;The deployment manifest links to the application manifest along with the hash of the application manifest, so if the application manifest changes the hash will no longer be valid. Similarly the Application manifest links to all the application files along with their hashes.&lt;/P&gt;
&lt;P&gt;So consider the situation where one of the application files say the .config file in this case changes after the app has been published. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/controlpanel/AppData/Local/Temp/WindowsLiveWriter736622988/supfiles1925C2D5/image19.png" mce_href="../AppData/Local/Temp/WindowsLiveWriter736622988/supfiles1925C2D5/image19.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: block; FLOAT: none; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: auto; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: auto" title=clip_image004 border=0 alt=clip_image004 src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/ResigningClickOncemanifests101_AC30/clip_image004_65741ff0-a0d7-499e-8dd4-a5a858b61bf4.gif" width=529 height=167 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/ResigningClickOncemanifests101_AC30/clip_image004_65741ff0-a0d7-499e-8dd4-a5a858b61bf4.gif"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Since the .config file changed the hash in the Application Manifest will not match up to the new file anymore. Trying to install the application in this state will fail (unless you are using optional signing and hashing of course). &lt;/P&gt;
&lt;P&gt;You will have to update and re-sign the application manifest in order to get the deployment to work again.&lt;/P&gt;
&lt;P&gt;You can do this using the following mage commandline:&lt;/P&gt;
&lt;P&gt;Start the Visual Studio command prompt. Locate the application manifest folder. Typically under “%Publish Folder%\Application Files\MyApplication_Version\Myapplication.exe.manifest”&lt;/P&gt;
&lt;P&gt;Use the &lt;A&gt;–update&lt;/A&gt; option for the mage command line.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT size=3 face=Consolas&gt;&amp;gt; mage –update Myapplication.exe.manifest –certfile mycert.pfx&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The update command will update all the file hashes defined in the application manifest to match those of the files located next to it. For other options on how to use update see MSDN: &lt;A href="http://msdn.microsoft.com/en-us/library/acz3y3te.aspx" mce_href="http://msdn.microsoft.com/en-us/library/acz3y3te.aspx"&gt;Manifest Generation and Editing Tool (Mage)&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Note: While update the application, you might see some errors about Files not found. This could happen if you using the .deploy extensions for you application files. To avoid this, you must rename the .deploy extensions back to their original extensions and then run the update command with mage. Once you have update the application manifest, you must rename the application files back with he .deploy extension.&lt;/P&gt;
&lt;P&gt;Once you have updated the application manifest with mage, all the files it refers to will have the correct hashes. However at this point since the application manifest itself is updated, the hash to the application manifest contained within the deployment manifest will no longer match.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/controlpanel/AppData/Local/Temp/WindowsLiveWriter736622988/supfiles1925C2D5/image26.png" mce_href="../AppData/Local/Temp/WindowsLiveWriter736622988/supfiles1925C2D5/image26.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: block; FLOAT: none; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: auto; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: auto" title=clip_image006 border=0 alt=clip_image006 src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/ResigningClickOncemanifests101_AC30/clip_image006_05d1e115-155e-4b0c-8701-ae598a169596.gif" width=529 height=167 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/ResigningClickOncemanifests101_AC30/clip_image006_05d1e115-155e-4b0c-8701-ae598a169596.gif"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;To fix this the deployment manifest needs to be updated with the hash of the new application manifest and re-signed.&lt;/P&gt;
&lt;P&gt;The mage command line to do this:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT size=3 face=Consolas&gt;&amp;gt; mage.exe –update Myapplication.application –appmanifest “Application Files\MyApplication_%Version%\Myapplication.exe.manifest” –certfile mycert.pfx&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT size=3 face=Consolas&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/controlpanel/AppData/Local/Temp/WindowsLiveWriter736622988/supfiles1925C2D5/image32.png" mce_href="../AppData/Local/Temp/WindowsLiveWriter736622988/supfiles1925C2D5/image32.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: block; FLOAT: none; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-LEFT: auto; BORDER-LEFT-WIDTH: 0px; MARGIN-RIGHT: auto" title=clip_image008 border=0 alt=clip_image008 src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/ResigningClickOncemanifests101_AC30/clip_image008_b96bfa0c-f411-459e-b9de-e0eb00c574e0.gif" width=529 height=167 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/ResigningClickOncemanifests101_AC30/clip_image008_b96bfa0c-f411-459e-b9de-e0eb00c574e0.gif"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;At this point, all the hashes to all the files have been updated and both manifests &lt;A&gt;have been &lt;/A&gt;re-signed. So the application is ready to be installed on the end users’ machine&lt;A&gt; without re-building or re-publishing from Visual Studio&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;In the above example I chose to show how the resigning process is done through the Mage command line tool. The same process can be done through the &lt;A href="http://msdn.microsoft.com/en-us/library/xhctdw55.aspx" mce_href="http://msdn.microsoft.com/en-us/library/xhctdw55.aspx"&gt;MAGEUI&lt;/A&gt; tool which provides a GUI for the manifest editing. For simply re-signing your manifests I have always preferred to use the command line. The re-signing process itself can be straightforward once you understand the need for it. Most users forget to either update or sign both manifests and I hope this post illustrates the chaining dependency and why both manifests need to be updated.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9577695" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Manifest/default.aspx">Manifest</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Saurabh+Bhatia/default.aspx">Saurabh Bhatia</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Mage/default.aspx">Mage</category></item><item><title>Channel 9 Interview: Resigning ClickOnce Application and Deployment Manifests with MAGE (Beth Massi, Saurabh Bhatia)</title><link>http://blogs.msdn.com/vsto/archive/2009/04/08/channel-9-interview-resigning-clickonce-application-and-deployment-manifests-with-mage-beth-massi-saurabh-bhatia.aspx</link><pubDate>Wed, 08 Apr 2009 18:25:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9538393</guid><dc:creator>VSTO Team</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9538393.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9538393</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://channel9.msdn.com/posts/funkyonex/Resigning-ClickOnce-Application-and-Deployment-Manifests-with-MAGE/" target="_blank"&gt;I just posted another interview on Channel 9&lt;/a&gt;. I sit down again with Saurabh Bhatia, a Program Manager on the Office Client team, who is responsible for the ClickOnce publishing functionality in Visual Studio. We chat about trust issues and certificates and he sets me straight on how ClickOnce deployment and application manifests work. He then shows how to resign them outside of Visual Studio using a tool called &lt;a href="http://msdn.microsoft.com/en-us/library/acz3y3te.aspx"&gt;Mage&lt;/a&gt;. This is really handy for folks that need to modify the files within a deployment package, like the application settings (app.config) file, but don't have Visual Studio installed. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://channel9.msdn.com/posts/funkyonex/Resigning-ClickOnce-Application-and-Deployment-Manifests-with-MAGE/"&gt;&lt;strong&gt;Channel 9: Resigning ClickOnce Application and Deployment Manifests with MAGE&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Saurabh draws on the whiteboard in this one and since I'm a one (wo)man show I couldn't jump up and zoom in so I redrew it for you all here. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/photos/bethmassi/images/9537238/original.aspx"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" src="http://blogs.msdn.com/photos/bethmassi/images/9537238/500x177.aspx" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Links from the show:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/acz3y3te.aspx"&gt;Mage&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/vsto"&gt;Office Client (VSTO) Team blog (you are here ;-))&lt;/a&gt;      &lt;li&gt;&lt;/li&gt;     &lt;a href="http://msdn.com/vsto"&gt;VSTO Developer Center&lt;/a&gt; &lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Enjoy,   &lt;br /&gt;-&lt;a href="http://blogs.msdn.com/bethmassi"&gt;Beth Massi&lt;/a&gt;, Visual Studio Community&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9538393" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2008/default.aspx">VS2008</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Saurabh+Bhatia/default.aspx">Saurabh Bhatia</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Beth+Massi/default.aspx">Beth Massi</category></item><item><title>Deploying Office Solutions with Visual Studio 2008 SP1 and Windows Installer (Mary Lee)</title><link>http://blogs.msdn.com/vsto/archive/2009/03/18/deploying-office-solutions-with-visual-studio-2008-sp1-and-windows-installer.aspx</link><pubDate>Wed, 18 Mar 2009 18:36:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9487159</guid><dc:creator>VSTO Team</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9487159.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9487159</wfw:commentRss><description>&lt;p&gt;In &lt;a title="http://blogs.msdn.com/vsto/archive/2008/05/29/deploying-office-solutions-with-a-setup-project.aspx" href="http://blogs.msdn.com/vsto/archive/2008/05/29/deploying-office-solutions-with-a-setup-project.aspx"&gt;Deploying Office Solutions with a Setup Project (Mary Lee)&lt;/a&gt;, you read about how to deploy Visual Studio Tools for Office solutions with Windows Installer (.msi) in Visual Studio 2008.&amp;#160; With Visual Studio 2008 Service Pack 1, the steps are the same: add the project output to the Setup project, add registry keys, sign the application and deployment manifests, and so on. &lt;/p&gt;  &lt;p&gt;However if you are using launch conditions to verify that the prerequisites are installed, you must update the launch condition to look for the VSTO 3.0 SP1 runtime.&lt;/p&gt;  &lt;p&gt;In the &lt;a href="http://msdn.microsoft.com/en-us/library/cc563937.aspx"&gt;Deploying a Visual Studio Tools for the Office System 3.0 Solution for the 2007 Microsoft Office System Using Windows Installer (Part 1 of 2)&lt;/a&gt; whitepaper, look at the &lt;b&gt;To configure launch conditions &lt;/b&gt;procedure.&amp;#160; Change step 6c from this:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Set the value of &lt;strong&gt;RegKey&lt;/strong&gt; to Software\Microsoft\vsto runtime Setup\v9.0.21022&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;to the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Set the value of &lt;strong&gt;RegKey&lt;/strong&gt; to Software\Microsoft\vsto runtime Setup\v9.0.&lt;b&gt;30729&lt;/b&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;We are working to update the whitepaper to reflect both of these registry keys. If you have questions about the whitepapers, please visit the &lt;a href="http://forums.microsoft.com/msdn/showforum.aspx?forumid=16&amp;amp;siteid=1"&gt;Visual Studio Tools for Office MSDN Forum&lt;/a&gt; to search for answers and ask your questions.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Happy deployment!&lt;/p&gt;  &lt;p&gt;Mary Lee, Programming Writer.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9487159" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/Mary+Lee/default.aspx">Mary Lee</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Windows+Installer/default.aspx">Windows Installer</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx">Deployment</category></item><item><title>Deploying Documents to a SharePoint Document Library (Mary Lee)</title><link>http://blogs.msdn.com/vsto/archive/2009/03/13/deploying-documents-to-a-sharepoint-document-library.aspx</link><pubDate>Sat, 14 Mar 2009 02:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9473880</guid><dc:creator>VSTO Team</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9473880.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9473880</wfw:commentRss><description>&lt;p&gt;When you are done developing your customized Microsoft Excel 2007 or Microsoft Word 2007 document-level project in Visual Studio 2008, you may want to publish it to a SharePoint document library for others to use from the SharePoint site, or they can copy the file from the site to their desktop to use locally. In either case, the customization assembly cannot be stored in the SharePoint document library, so you have to configure the workbook to store the assembly on a file share.&lt;/p&gt;  &lt;p&gt;In &lt;strong&gt;Solution Explorer&lt;/strong&gt;, right-click the Excel document-level project, and then click &lt;strong&gt;Publish&lt;/strong&gt;. You'll see the Publish Wizard appear.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In the first page of the Publish Wizard, type the folder name where you want Visual Studio to copy the files, known as the &lt;em&gt;publish location&lt;/em&gt;. In this case, it's a subfolder of the project folder.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingDocumentstoaSharePointDocumentL_958A/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingDocumentstoaSharePointDocumentL_958A/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="240" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingDocumentstoaSharePointDocumentL_958A/image_thumb.png" width="587" border="0" mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingDocumentstoaSharePointDocumentL_958A/image_thumb.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In the second page of the Publish Wizard, type the folder name where the installation files will be located. In this example, the installation files are located on a configure the workbook to look for the assembly on a file share, known as the &lt;em&gt;install location&lt;/em&gt;. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingDocumentstoaSharePointDocumentL_958A/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingDocumentstoaSharePointDocumentL_958A/image_4.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="269" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingDocumentstoaSharePointDocumentL_958A/image_thumb_1.png" width="587" border="0" mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingDocumentstoaSharePointDocumentL_958A/image_thumb_1.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Note: You could have set the publish location to this file share in step 1 if you have access rights to the file share. Setting the install location separate from the publish location allows you to publish the files locally and then hand the files over to an IT administrator to upload the files to a file share.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The third and last page of the Publish Wizard is a summary of the publish options.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingDocumentstoaSharePointDocumentL_958A/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingDocumentstoaSharePointDocumentL_958A/image_6.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="237" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingDocumentstoaSharePointDocumentL_958A/image_thumb_2.png" width="586" border="0" mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingDocumentstoaSharePointDocumentL_958A/image_thumb_2.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Copy the publish folder from step 1 to the file share, and upload the Excel workbook file to a SharePoint document library.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingDocumentstoaSharePointDocumentL_958A/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingDocumentstoaSharePointDocumentL_958A/image_8.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="152" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingDocumentstoaSharePointDocumentL_958A/image_thumb_3.png" width="733" border="0" mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingDocumentstoaSharePointDocumentL_958A/image_thumb_3.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The final step is to trust the location of the SharePoint document library to the Trusted Location in Excel.&amp;#160; Copy the URL of the SharePoint document library and remove the last Forms/Allitems.aspx text from the URL.&amp;#160; For example, if your SharePoint document library is &lt;a title="http://sharepoint/sites/bizappsue/SampleDocLibrary/Forms/AllItems.aspx" href="http://sharepoint/sites/writers/SampleDocLibrary/Forms/AllItems.aspx" mce_href="http://sharepoint/sites/writers/SampleDocLibrary/Forms/AllItems.aspx"&gt;http://sharepoint/sites/writers/SampleDocLibrary/Forms/AllItems.aspx&lt;/a&gt;, the location to add to Excel is &lt;a href="http://sharepoint/sites/writers/SampleDocLibrary" mce_href="http://sharepoint/sites/writers/SampleDocLibrary"&gt;http://sharepoint/sites/writers/SampleDocLibrary&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;1. Open Excel.&lt;/p&gt;  &lt;p&gt;2. Click the Microsoft Office button.&amp;#160; &lt;/p&gt;  &lt;p&gt;3. Click &lt;strong&gt;Excel Options&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;4. Click &lt;strong&gt;Trust Center&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;5. Click &lt;strong&gt;Trust Center Settings&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;6. Click &lt;strong&gt;Trusted Locations&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;7. Check &lt;strong&gt;Allow Trusted Locations on my network&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;8. Click &lt;strong&gt;Add new location&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;9. In the &lt;strong&gt;Microsoft Office Trusted Location&lt;/strong&gt; dialog box, in the &lt;strong&gt;Path&lt;/strong&gt; textbox, type or paste the URL to the SharePoint document library. In this example, it's &lt;a href="http://sharepoint/sites/writers/SampleDocLibrary" mce_href="http://sharepoint/sites/writers/SampleDocLibrary"&gt;http://sharepoint/sites/writers/SampleDocLibrary&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;10. Click &lt;strong&gt;OK&lt;/strong&gt; to close the Microsoft Office Trusted Location dialog box.&lt;/p&gt;  &lt;p&gt;11. Click &lt;strong&gt;OK&lt;/strong&gt; to close the Trust Center dialog box.&lt;/p&gt;  &lt;p&gt;12. Click &lt;strong&gt;OK&lt;/strong&gt; to close the Excel Options dialog box.&lt;/p&gt;  &lt;p&gt;Finally, open the Excel workbook file from the SharePoint document library. This starts the installation process for the Excel solution. Depending on the security settings, you may see the &lt;strong&gt;Microsoft Office Customization Installer&lt;/strong&gt; dialog box prompting you to install the Excel solution.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This is the blog version of the following topic in the MSDN Library: &lt;a href="http://msdn.microsoft.com/en-us/library/bb608595.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb608595.aspx"&gt;How to: Deploy a Document-Level Office Solution to a SharePoint Server (2007 System)&lt;/a&gt;. You can also see the video demonstration at &lt;a href="http://go.microsoft.com/fwlink/?LinkID=140822" mce_href="http://go.microsoft.com/fwlink/?LinkID=140822"&gt;Video How to: Deploy a Document-Level Office Solution to a SharePoint Server (2007 System)&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Happy deployment!&lt;/p&gt;  &lt;p&gt;Mary Lee, Programming Writer.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9473880" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/Mary+Lee/default.aspx">Mary Lee</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.msdn.com/vsto/archive/tags/SharePoint/default.aspx">SharePoint</category></item><item><title>VSTO Runtime bootstrapper package failure causes deployed customization installation to fail (Aaron Cathcart)</title><link>http://blogs.msdn.com/vsto/archive/2009/02/07/vsto-runtime-bootstrapper-package-failure-causes-deployed-customization-installation-to-fail-aaron-cathcart.aspx</link><pubDate>Sat, 07 Feb 2009 11:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9404080</guid><dc:creator>VSTO Team</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9404080.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9404080</wfw:commentRss><description>&lt;P&gt;In an attempt to make this easier to read here are a few terms I will be using frequently in this article: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;VSTOR = Visual Studio Tools for the Microsoft Office System (version 3.0 Runtime) (x86) &lt;/LI&gt;
&lt;LI&gt;VSTORSP1 = Visual Studio Tools for the Microsoft Office System (version 3.0 Runtime) Service Pack 1(x86) &lt;/LI&gt;
&lt;LI&gt;Bootstrapper = the clickonce bootstrapper that gets deployed with a VSTO customization when there are prerequisites checked (setup.exe) &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Some of our customers have raised an issue with the bootstrapper failing after deploying their customizations onto a user’s machine that has previously had VSTOR &amp;amp; VSTORSP1 installed. &lt;/P&gt;
&lt;P&gt;The problem occurs when an end user installs VSTOR followed by VSTORSP1 then subsequently uninstalls VSTOR from the Add/Remove Programs wizard. The uninstall removes the entire product including the service pack but fails to update the registry keys that our bootstrapper uses to detect if VSTOR is installed. If a user then installs a customization using the bootstrapper it will incorrectly detect that VSTOR is installed and proceed to install VSTORSP1, at which point it fails. &lt;/P&gt;
&lt;P&gt;I recently responded to a customer on the VSTO forums ( &lt;A href="http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/2dd02b04-cc89-47c3-8f76-462ecfbee65e" mce_href="http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/2dd02b04-cc89-47c3-8f76-462ecfbee65e"&gt;http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/2dd02b04-cc89-47c3-8f76-462ecfbee65e&lt;/A&gt; ) regarding this issue where I approached it from an end-user perspective, providing them with a list of fixes for post-deployment use. The purpose of this article is to provide a solution that developers can utilize so that end-users machines do not require post-deployment modification.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;This workaround will allow developers to bake the correct VSTOR detection logic into every customization they develop that utilizes the bootstrapper.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is what you need to do:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;On the development machine locate the file %ProgramFiles%\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\VSTOR30\product.xml &lt;/LI&gt;
&lt;LI&gt;Replace the element &lt;BR&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;RegistryCheck &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Property&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;VSTORuntimeInstalled&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Key&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;HKLM\SOFTWARE\Microsoft\VSTO Runtime Setup\v9.0.21022&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Value&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Install&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;/&amp;gt; &lt;BR&gt;&lt;/SPAN&gt;with&amp;nbsp; &lt;BR&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;MsiProductCheck &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Property&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;VSTORuntimeInstalled&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Product&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;{8FB53850-246A-3507-8ADE-0060093FFEA6}&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;&lt;/SPAN&gt; &lt;/LI&gt;
&lt;LI&gt;Alter the element &lt;BR&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;BypassIf &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Property&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;VSTORuntimeInstalled&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Compare&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;ValueGreaterThanOrEqualTo&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Value&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;1&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;/&amp;gt; &lt;BR&gt;&lt;/SPAN&gt;to be &lt;BR&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;BypassIf &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Property&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;VSTORuntimeInstalled&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Compare&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;ValueGreaterThanOrEqualTo&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;Value&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;3&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;&lt;/SPAN&gt; &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;And that’s it! Now that you have made these changes to your product.xml, every VSTO customization you build and deploy with a bootstrapper will correctly detect if VSTOR is installed regardless of what state the end-users machine is in.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9404080" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.msdn.com/vsto/archive/tags/MSI/default.aspx">MSI</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Add+Remove+Programs/default.aspx">Add Remove Programs</category><category domain="http://blogs.msdn.com/vsto/archive/tags/SP1/default.aspx">SP1</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Aaron+Cathcart/default.aspx">Aaron Cathcart</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Bootstrapper/default.aspx">Bootstrapper</category></item><item><title>Best Practices for Deployment with Visual Studio 2008 SP1 (Mary Lee, Rachel Schaw)</title><link>http://blogs.msdn.com/vsto/archive/2009/02/02/best-practices-for-deployment-with-visual-studio-2008-sp1.aspx</link><pubDate>Tue, 03 Feb 2009 02:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9385465</guid><dc:creator>VSTO Team</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9385465.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9385465</wfw:commentRss><description>&lt;P&gt;After you develop Office solutions with Visual Studio Tools for Office, you can use Visual Studio 2008 SP1 to simplify your deployment experience. First, you can take advantage of the smaller .NET Framework Client Profile to decrease download time. Next, the Office 2007 primary interop assemblies (PIAs) are included in-the-box with VS2008 SP1 to avoid having to generate bootstrapper manifests. Finally, you can also troubleshoot any installation problems with the event viewer.&lt;/P&gt;
&lt;P&gt;Develop your Office 2007 solutions against the .NET Framework Client Profile.&amp;nbsp; The large size of the .NET Framework 3.5 SP1 can lead to long download times.&amp;nbsp; The .NET Framework Client Profile is only 25MB in size, so download times are reduced when installing from the component vendor's web site. For more information about how to configure your solution to use the .NET Framework Client Profile, see &lt;A href="http://msdn.microsoft.com/en-us/library/bb398202.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb398202.aspx"&gt;How to: Target a Specific .NET Framework&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/BestPracticesforDeploymentwithVisualStud_D363/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/BestPracticesforDeploymentwithVisualStud_D363/image_8.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=416 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/BestPracticesforDeploymentwithVisualStud_D363/image_thumb_3.png" width=544 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/BestPracticesforDeploymentwithVisualStud_D363/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Deploying the Office 2007 primary interop assemblies is now (mostly) hassle-free. Visual Studio 2008 SP1 includes the Office 2007 PIAs as part of the update.&amp;nbsp; This relieves you from having to download the PIA installer, download a code sample that contains the bootstrapper manifests, move the manifests to a certain directory, compile the ComponentCheck.cpp file to verify that the correct version of Microsoft Office is installed, and dance the hula.&amp;nbsp; Instead, developing with one of the Visual Studio Tools for Office project templates already marks the Microsoft Office 2007 primary interop assemblies as a prerequisites.&amp;nbsp; All you have to do is right-click on the project in &lt;STRONG&gt;Solution Explorer&lt;/STRONG&gt; and click &lt;STRONG&gt;Publish&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/BestPracticesforDeploymentwithVisualStud_D363/image_10.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/BestPracticesforDeploymentwithVisualStud_D363/image_10.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=423 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/BestPracticesforDeploymentwithVisualStud_D363/image_thumb_4.png" width=548 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/BestPracticesforDeploymentwithVisualStud_D363/image_thumb_4.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Troubleshooting the installation and deployment process is more transparent. Any errors that occur are now logged in the event viewer. For example, I deliberately installed the same Office solution twice to generate the following error in the event viewer. Developers commonly see this error when they build and debug an Office solution on their development computer, and then try to install the Office solution on the same development computer. To avoid this problem, use a different account to test the installer on the development computer, or use a different test computer. For more information about the event viewer, see &lt;A href="http://msdn.microsoft.com/en-us/library/cc442816.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc442816.aspx"&gt;Event Logging (2007 System)&lt;/A&gt;.&lt;/P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/BestPracticesforDeploymentwithVisualStud_D363/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/BestPracticesforDeploymentwithVisualStud_D363/image_4.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=576 alt=image src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/BestPracticesforDeploymentwithVisualStud_D363/image_thumb_1.png" width=585 border=0 mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/BestPracticesforDeploymentwithVisualStud_D363/image_thumb_1.png"&gt;&lt;/A&gt; 
&lt;P&gt;Visual Studio 2008 SP1 also introduced ClickOnce manifests that do not need to be signed. However, Visual Studio Tools for Office relies on signed manifests to identify the publisher and determine if the Office solution is trusted.&amp;nbsp; Optional signing is a feature in VS2008 SP1 that does not apply to Office developers. For more information about trusting Office solutions, see &lt;A href="http://msdn.microsoft.com/en-us/library/bb772086.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb772086.aspx"&gt;Granting Trust to Office Solutions (2007 System)&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Mary Lee, Programming Writer.&lt;/P&gt;
&lt;P&gt;Rachel Shaw, Program Manager.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9385465" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Mary+Lee/default.aspx">Mary Lee</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.msdn.com/vsto/archive/tags/primary+interop+assemblies/default.aspx">primary interop assemblies</category><category domain="http://blogs.msdn.com/vsto/archive/tags/.NET+Framework+Client+Profile/default.aspx">.NET Framework Client Profile</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Rachel+Schaw/default.aspx">Rachel Schaw</category></item><item><title>Deploying Office 2003 Solutions with Windows Installer (Mary Lee)</title><link>http://blogs.msdn.com/vsto/archive/2008/12/17/deploying-office-2003-solutions-with-windows-installer-mary-lee.aspx</link><pubDate>Thu, 18 Dec 2008 02:08:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9232290</guid><dc:creator>VSTO Team</dc:creator><slash:comments>16</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9232290.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9232290</wfw:commentRss><description>&lt;p&gt;You may want to develop Microsoft Office 2003 solutions with Visual Studio Tools for Office (VSTO) in Visual Studio 2008 SP1 for several reasons.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Your customers are using Microsoft Office 2003.&lt;/li&gt;    &lt;li&gt;Your customers are using both Microsoft Office 2003 and the 2007 Microsoft Office system.&lt;/li&gt;    &lt;li&gt;Your customers are using .NET Framework 2.0 and cannot migrate to .NET Framework 3.5.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Once you're done with development, you'll want to deploy your Microsoft Office 2003 solutions to your end users. This process involves the following steps:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Check for and install the following prerequisites: .NET FX 2.0, VSTO 2005 SE runtime, and the Microsoft Office primary interop assemblies.&amp;#160; If your client computers already have the prerequisites, or you want to do this manually, you can skip this step.&lt;/li&gt;    &lt;li&gt;Copy the customization assembly to the end user computer.&lt;/li&gt;    &lt;li&gt;Grant full trust to the customization assembly.&lt;/li&gt;    &lt;li&gt;For application-level add-ins only, create a set of registry keys so that the Office application knows to load the add-in.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Due to customer demand, I've created five &lt;a href="http://code.msdn.microsoft.com/VSTO2005SEMSI"&gt;deployment samples&lt;/a&gt; that demonstrate these steps. Step 1 is demonstrated in two ways: you can select your prerequisites through the &lt;a href="http://msdn.microsoft.com/en-us/library/7tx0bw8y.aspx"&gt;Prerequisites Dialog Box&lt;/a&gt; to be installed with the Setup.exe bootstrapper; alternatively, you can configure launch conditions in the Setup project to only install the customization if the prerequisites already exist. &lt;/p&gt;  &lt;p&gt;Prerequisites Dialog Box:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingOffice2003SolutionswithWindowsI_9C61/image_6.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="378" alt="Prerequisites Dialog Box" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingOffice2003SolutionswithWindowsI_9C61/image_thumb_2.png" width="484" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Launch Conditions editor:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingOffice2003SolutionswithWindowsI_9C61/image_16.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="140" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingOffice2003SolutionswithWindowsI_9C61/image_thumb_7.png" width="657" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can use the Setup project to complete step 2 by copying the customization assembly and for document-level projects, the document or workbook, to the designated installation location. This is done by adding the project output with the File System Editor. The default installation location in these Setup projects is %PROGRAMFILES%\MyCompany\&amp;lt;Name of Setup Project&amp;gt;.&lt;/p&gt;  &lt;p&gt;File System Editor:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingOffice2003SolutionswithWindowsI_9C61/image_12.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="120" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingOffice2003SolutionswithWindowsI_9C61/image_thumb_5.png" width="663" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Full trust is granted by using the SetSecurity project for step 3. This code uses a custom action in the Setup project to create a &lt;a href="http://msdn.microsoft.com/en-us/library/930b76w0.aspx"&gt;code access security&lt;/a&gt; policy that creates a solution code group for your Office solution, and an assembly code group for the customization assembly. &lt;/p&gt;  &lt;p&gt;Custom Actions Editor:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingOffice2003SolutionswithWindowsI_9C61/image_14.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="174" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingOffice2003SolutionswithWindowsI_9C61/image_thumb_6.png" width="659" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Step 4 only applies to application-level add-ins: when you use the Excel 2003 add-in or Word 2003 add-in project templates, there is a Setup project automatically added to your Office solution that already creates the registry keys documented in &lt;a href="http://msdn.microsoft.com/en-us/library/bb386106.aspx"&gt;Registry Entries for Application-Level Add-Ins&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Registry Editor:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingOffice2003SolutionswithWindowsI_9C61/image_10.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="229" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/DeployingOffice2003SolutionswithWindowsI_9C61/image_thumb_4.png" width="656" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The process of preparing the development computer for deployment and configuring the Setup project is written out step-by-step in the following two whitepapers:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb332051.aspx"&gt;Deploying Visual Studio 2005 Tools for the Office System SE Solutions Using Windows Installer (Part 1 of 2)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb332052.aspx"&gt;Deploying Visual Studio 2005 Tools for the Office System SE Solutions Using Windows Installer: Walkthroughs (Part 2 of 2)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now, it's time to experiment on your own. &lt;strong&gt;Download the sample code&lt;/strong&gt; and the completed installers from the MSDN Code Gallery: &lt;a title="http://code.msdn.microsoft.com/VSTO2005SEMSI" href="http://code.msdn.microsoft.com/VSTO2005SEMSI"&gt;http://code.msdn.microsoft.com/VSTO2005SEMSI&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Happy deployment!&lt;/p&gt;  &lt;p&gt;Mary Lee, Programming Writer.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9232290" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Mary+Lee/default.aspx">Mary Lee</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Windows+Installer/default.aspx">Windows Installer</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Office+2003/default.aspx">Office 2003</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.msdn.com/vsto/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.msdn.com/vsto/archive/tags/MSI/default.aspx">MSI</category><category domain="http://blogs.msdn.com/vsto/archive/tags/add-ins/default.aspx">add-ins</category></item><item><title>Why Can’t I Change the Update Path when Redeploying VSTO Solutions? (Christin Boyd, Kris Makey, Jeff Young)</title><link>http://blogs.msdn.com/vsto/archive/2008/12/16/why-can-t-i-change-the-update-path-when-redeploying-vsto-solutions-christin-boyd-kris-makey-jeff-young.aspx</link><pubDate>Wed, 17 Dec 2008 01:45:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9228873</guid><dc:creator>VSTO Team</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9228873.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9228873</wfw:commentRss><description>&lt;p&gt;The other day I was asked about the automatic Updates feature of VSTO 3.0 deployment.&amp;nbsp; In this scenario, he used the Publish Wizard in VS 2008 to create a Word document solution and the install manifest.&amp;nbsp;&amp;nbsp; Then a bunch of people used the Word document, and kicked off the installer which then copied things to their ClickOnce cache.&amp;nbsp; Everything worked fine.&amp;nbsp; Then he needed to make changes to the code, recompile, and somehow get the solution to all of his customers.&amp;nbsp; Instead of using the Publish Wizard to create the update in the same server, he chose to use a different server path.&amp;nbsp; The customers were unable to install the updates.&amp;nbsp; He tried editing the custom properties of the document to change the install path to the new server, but it still didn’t work.&amp;nbsp; Then he tried testing with a new, clean computer, and on that computer he was able to install from the new path and use the new Word document.&amp;nbsp; He asked us why were the “old” users unable to get the update? &lt;p&gt;This question shows up on the Forum occasionally.&amp;nbsp; “Why can I not change the update location of VSTO v3 Add-in or Document once it is installed?”&amp;nbsp; (Or) “Why does VSTO continue to check in the old location even after I change location property on client machines that installed the old version?” &lt;p&gt;The Path to the deployment manifest is used as part of the Identity for an Add-in.&amp;nbsp; During the First installation of an Add-in or Document, the Full Path is set and stored by the VSTO Runtime for that client machine.&amp;nbsp; Once you have installed an Add-in changing the path in the registration will cause the Add-in to throw an Error.&amp;nbsp; Once you have installed a customized Document, the code-behind will only check the original location and changes to the path stored in the document will be ignored (this is to allow copying a local version of a customized document that you installed from a remote location).&amp;nbsp; In order to change the location that an Add-in or Document checks for updates, you must First uninstall the “old” version on the installed clients and then install from the new location.&amp;nbsp; &lt;p&gt;Now, if you want to delve deeper, then keep reading this paragraph, or skip to the next one.&amp;nbsp; The low-level explanation is that ClickOnce uses the solution path as part of its identity when storing solutions into the ClickOnce cache.&amp;nbsp;&amp;nbsp; You will get &lt;i&gt;similar&lt;/i&gt; behavior in a CO-deployed Windows Application as well _&lt;i&gt;unless&lt;/i&gt;_ you use the deploymentProviderURL (DPURL).&amp;nbsp; Setting the DPURL can allow WinForms applications to change where updates are pulled from so that Server A (from which a solution was original installed) can be decommissioned and updates can be retrieved from Server B.&amp;nbsp; VSTO does not support DPURL.&amp;nbsp; Why not, you ask?&amp;nbsp; At the time we were considering it during the development of VS 2008, the amount of development work-months required was more than the time we had remaining (DPURL has implications on migration of data from old solution to new solution, for instance).&amp;nbsp; After much discussion, we decided to have the ClickOnce team throw an exception of a DPURL is set for VSTO solutions.&amp;nbsp; At the start of development for VS 2010, we considered this feature again, but again this feature did not make our list of highest priority deployment features.&amp;nbsp; We are implementing a lot of new deployment features for VS 2010. &lt;p&gt;In conclusion, the solution Path is used as part of the identity.&amp;nbsp; You can’t change the update path after you've installed an Office solution.&amp;nbsp; In a Windows solution, you can change the update path using DPURL.&amp;nbsp; VSTO doesn’t support DPURL because we couldn’t fit that feature in the development schedule.&amp;nbsp; The workaround is to uninstall the solution from the user’s computer when it is stuck pointing to an old path that you can’t update anymore and then reinstall with a new Install Path set in the Publish wizard.&amp;nbsp; We recommend that you set your Install Path to a URL that you predict can stay the same for as long as your users will need updates. &lt;p&gt;This explanation applies to Word document and template solutions, and to Excel spreadsheet and template solutions. &lt;p&gt;I hope this blog entry is helpful!&amp;nbsp; Please leave comments to this article if you have feedback.&amp;nbsp; &lt;p&gt;-Kris Makey, Jeff Young, Christin Boyd, Mary Lee and Saurabh Bhatia contributed to this blog post&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9228873" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Christin+Boyd/default.aspx">Christin Boyd</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Word+2007/default.aspx">Word 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Excel+2007/default.aspx">Excel 2007</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.msdn.com/vsto/archive/tags/VS2008/default.aspx">VS2008</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Manifest/default.aspx">Manifest</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Add+Remove+Programs/default.aspx">Add Remove Programs</category></item><item><title>How to Include .NET Framework 3.5 SP1 with Your Installer (Mary Lee)</title><link>http://blogs.msdn.com/vsto/archive/2008/11/18/how-to-include-net-framework-3-5-sp1-with-your-installer.aspx</link><pubDate>Wed, 19 Nov 2008 01:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9120595</guid><dc:creator>VSTO Team</dc:creator><slash:comments>14</slash:comments><comments>http://blogs.msdn.com/vsto/comments/9120595.aspx</comments><wfw:commentRss>http://blogs.msdn.com/vsto/commentrss.aspx?PostID=9120595</wfw:commentRss><description>&lt;p&gt;Recently in the &lt;a href="http://social.msdn.microsoft.com/forums/en-US/vsto/threads/" mce_href="http://social.msdn.microsoft.com/forums/en-US/vsto/threads/"&gt;Visual Studio Tools for Office forum&lt;/a&gt;, a Visual Studio 2008 SP1 developer asked how to include the .NET Framework 3.5 Service Pack 1 in the same directory as the application.&amp;#160; For example, you can select &lt;strong&gt;Download prerequisites from the same location as my application&lt;/strong&gt; in the &lt;a href="http://msdn.microsoft.com/en-us/library/7tx0bw8y.aspx" mce_href="http://msdn.microsoft.com/en-us/library/7tx0bw8y.aspx"&gt;Prerequisites Dialog Box&lt;/a&gt; if your application is going out on CD and being installed without a network connection.&amp;#160; &lt;/p&gt;  &lt;p&gt;However, when you try to build your setup project or ClickOnce installer, you see the following error message: &amp;quot;The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35SP1\dotNetFX20\netfx20a_x86.msi' in item '.NET Framework 3.5 SP1' can not be located on disk. &amp;quot;&lt;/p&gt;  &lt;p&gt;What does it mean?&amp;#160; The installers for .NET Framework 3.5 SP1 were not included in the VS2008 SP1 installer due to size restrictions. The default deployment experience is to download the .NET Framework 3.5 SP1 from the Microsoft Download Center during installation.&amp;#160; &lt;/p&gt;  &lt;p&gt;How do you include the .NET Framework 3.5 SP1? You can download the full .NET Framework 3.5 SP1 installer and extract the necessary files to the Visual Studio bootstrapper directory. After you modify the product.xml file and update the PublicKey value, the .NET Framework 3.5 SP1 will appear in the &lt;a href="http://msdn.microsoft.com/en-us/library/7tx0bw8y.aspx" mce_href="http://msdn.microsoft.com/en-us/library/7tx0bw8y.aspx"&gt;Prerequisites Dialog Box&lt;/a&gt;. You can find the full instructions in the &lt;a href="http://download.microsoft.com/download/A/2/8/A2807F78-C861-4B66-9B31-9205C3F22252/VS2008SP1Readme.htm" mce_href="http://download.microsoft.com/download/A/2/8/A2807F78-C861-4B66-9B31-9205C3F22252/VS2008SP1Readme.htm"&gt;Visual Studio 2008 Service Pack 1 Readme&lt;/a&gt; in &lt;strong&gt;section 2.3.1.1 Enable Samesite for the .NET Framework 3.5 SP1 bootstrapper package&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HowtoInclude.NETFr.5SP1withYourInstaller_E3AE/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HowtoInclude.NETFr.5SP1withYourInstaller_E3AE/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="453" alt="image" src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HowtoInclude.NETFr.5SP1withYourInstaller_E3AE/image_thumb.png" width="589" border="0" mce_src="http://blogs.msdn.com/blogfiles/vsto/WindowsLiveWriter/HowtoInclude.NETFr.5SP1withYourInstaller_E3AE/image_thumb.png" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;While these steps may seem lengthy, you only have to complete the steps once on your development computer. Then, every project you develop and deploy can include .NET Framework 3.5 SP1 as a prerequisite.&lt;/p&gt;  &lt;p&gt;If you have further questions about deployment, visit the &lt;a href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=6&amp;amp;SiteID=1"&gt;ClickOnce and Setup &amp;amp; Deployment MSDN forum&lt;/a&gt; to search for answers or ask your questions.&lt;/p&gt;  &lt;p&gt;Happy deployment!&lt;/p&gt;  &lt;p&gt;Mary R Lee, programming writer.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9120595" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/vsto/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Mary+Lee/default.aspx">Mary Lee</category><category domain="http://blogs.msdn.com/vsto/archive/tags/Deployment/default.aspx">Deployment</category><category domain="http://blogs.msdn.com/vsto/archive/tags/MSI/default.aspx">MSI</category></item></channel></rss>