在.Net Deployment 中,如何将文件复制到特定文件夹中?

During .Net Deployment, how to copy a file into a specific folder?

我正在使用 vsto、vs ultimate 2013 和 c# 为 PowerPoint 2013 开发插件。在部署过程中(使用 Msi Installer、ClickOnce 或 ClickTwice),如何将我的数据(文件)从项目解决方案复制到用户计算机上的特定文件夹中?

我对 .Net 很陌生。对不起,我可能无知。

您只需将它们作为内容文件包含到安装程序中。有关详细信息,请参阅 Deploying an Office Solution

您可能还会发现 How to deploy files with a clickonce application? 论坛帖子很有帮助。

Take those files out of your \bin\debug folder and add them to your project. You can either add them to the top level of your project, or put them in a folder under the top level of your project. In the properties, set Build Action to 'content' and 'Copy to output directory' to "Copy always". They will be deployed relative to the top level of the deployment folders.

我必须在一个应用程序中部署 6 个加载项 (word\excel\powerpoint)。我放弃了解决这个问题并使用了 Advanced Installer。使用它部署一切都非常容易,如果你能承担成本的话。