0
votes

I have the following situation:

I developed a VSTO Excel 2016 Workbook, which triggers some code when you copy/paste an Excel Worksheet in the above mentioned Workbook. When i publish the project (Project Properties > Publish > Publish Now), Visual Studio creates the following in Folder:

  1. Excel Workbook(.xlsx)
  2. VSTO file(.vsto)
  3. setup.exe file

The Workbook only opens without error when i first run the Setup, wich obviously installs the .vsto file.

My Question:

Can you generate/publish a .xlsx Workbook which is portable, i.e. you dont have to install anything since the Code is already in the .xlsx file? Because I dont want to run the setup.exe everytime when i switched to another PC.

Or is there even an alternative solution to VSTO/my problem?

1

1 Answers

1
votes

The only way to embed and distribute code with a workbook is to use VBA.

There is no way to embed a VSTO solution in a workbook - VSTO was explicitly designed to not allow that for reasons of code maintenance and security.