Excel Development Learning Note: Publish an Excel Development project under VSTO

Source: Internet
Author: User
Tags visual studio 2010

Working on a data processing automation problem, I intend to develop an Excel-based gadget. In the spare time while self-taught Excel development side hands-on practice, recently completed the prototype. Take the time to write down some knowledge for future reference, because Walk is the wild way of elephant, naïve and wrong please forgive.

The development environment is based on VSTO (no VBA), specific configuration: Visual Studio 2010,VB. Net,excel 2007, document-level customization program.


Because it is a small tool for personal use, the requirements for deployment are low, there is a setup file, and no older versions of Office are required. The simplest is to use VS2010 's publish function, but the actual operation is still not smooth sailing. Because the content is published in addition to its own code, a series of deployment dependencies are involved. You can view and set the dependencies for the current project by right-clicking on the Project Project-->properties-->publish-->prerequisites. For my project, there are 3 of them:

    1. . NET Framework 4 Client Profile
    2. vs. tools for Office Runtime
    3. Windows Installer 3.1

The default way to install these dependencies is through the Web installation, which is not suitable for my deployment requirements (isolated LAN), so this interface is modified to be published along with the local program. Then right-click Project Project-->publish, go to the Publish Wizard interface, all the way forward, by default in the project file directory to generate a publish directory containing the following content:

    1. Application Files directory: Inside is the release file of your own code
    2. Dotnetfx40client directory: A. NET dependent file inside
    3. VSTOR40 directory: A VSTO dependent file inside
    4. Windowsinstaller3_1 directory: Installing dependent files
    5. Xxxx.vsto Files: Installation configuration
    6. XXXX.XLSX file: Program files, I am here a document-level customization program
    7. Setup.exe files: installation files

When installing, copy the entire publish directory to the target machine, and then double-click Setup to install the dependencies automatically before installing our program.

This is sufficient for newer operating systems, such as Windows Server SP2, but my environment also has Windows 2003 server 64bit machines, which will fail to install, which has been a problem for me for a long time, Google for a long time to find a post in StackOverflow, the conclusion is the need to install Windows Imaging Component (WIC, can go to Microsoft to download the appropriate version). I developed the machine before the download has this file, installation done.

Excel Development Learning Note: Publish an Excel Development project under VSTO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.