How to add "MS Visual Studio 20xx Tools for Office Runtime"?

I recently developed a small Excel 2010 add-in in beta version of Visual Studio 2011 and tried to deploy the solution right now. I chose the .NET Framework 4 as a prerequisite, and setup.exe downloads it if it is not already installed on the target computer.

But I get headaches when I try to catch the "Tools for Office Runtime" in the Prerequisites dialog box on the Publish tab when I create it. The strange thing: an old installation of Visual Studio 2010 was installed in my Office, which has this option, I can select an entry, build it and load it: the runtime is loading.

How can I say Visual Studio: Look, I need this runtime, check it before installation. Because right now setup.exe installs the add-in and crashes when you first start Excel.

Additional Information:

  • I am using a single deployment
  • C # VSTO add-in
  • Targeting Excel 2010

Edit

I think I found a solution for this:

  • I copied the VSTOR4 directory from my office PC, located in the folder "C: \ Program Files (x86) \ Microsoft SDK \ Windows \ v7.0A \ Bootstrapper \ Packages", and placed it on my developer's laptop in the same place, Result: not found.
  • I copied it to `` C: \ Program Files (x86) \ Microsoft SDK \ Windows \ v8.0A \ Bootstrapper \ Packages ''
  • I edited the project.csproj project to include the following option:
<BootstrapperPackage Include="Microsoft.VSTORuntime.4.0"> <Visible>False</Visible> <ProductName>Microsoft Visual Studio 2010 Tools for Office Runtime %28x86 and x64%29</ProductName> <Install>true</Install> </BootstrapperPackage> 

The question is: is this correct? Will there be problems that I did not think about now? Why is it not possible to simply load additional boot files (yes, but for .NET 2.0 and some MDAC components I do not use)?

Deploying VSTO is just painful as it is, and not directly compared to the simple MSI Installer, done procedure. Having to deal with such issues really makes me a curious inconvenience for the entire add-in architecture, but this is another story for another day.

+4
source share
1 answer

Although you did it manually, it will work fine. Alternatively, you can go to the project properties, the Publish tab, and click the Prerequisites button to open the pre-requsites dialog where you can see the VSTOR40 along with other boot components. If you do not see a specific person, there are two possible reasons:

  • You do not have a bootstrapper package in the folder C: \ Program Files (x86) \ Microsoft SDK \ Windows \ v8.0A \ Bootstrapper \ Packages (replace with v7.0 for VS2010)

  • Your product.xml (available at the location above) contains incorrect information.

One-sided note. You should check your product.xml file for the HomeSite attribute and make sure that you have this set matching the “fwlink” provided by Microsoft for this package. fwlinks are basically permanent web links from which the package can be downloaded by the ClickOnce installer, so you do not need to distribute it with your product. Use Google to search for fwlinks of various bootstrapper packages.

+1
source

Source: https://habr.com/ru/post/1433419/


All Articles