向 vb.net 项目添加额外的文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14681179/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 12:10:29  来源:igfitidea点击:

adding extra files to vb.net project

vb.netpublish

提问by Jerry

I am trying to add some 'supporting' files to my project in VB.NET Express 2012. These files are additional files that are not really part of VB.NET such as RTF files which are templates for reports etc. There is also some text based template files, that will get modified as part of the execution of my program.

我试图在 VB.NET Express 2012 中向我的项目添加一些“支持”文件。这些文件是不是 VB.NET 真正一部分的附加文件,例如作为报告模板的 RTF 文件等。还有一些文本基于模板文件,这些文件将作为我程序执行的一部分进行修改。

What I have done:

我做了什么:

  • I have added these to the project (i.e. they appear in the Solution Explorer under the project)

  • I have set the 'Copy to Output Directory' of each of the files to "Copy Always" in the properties window.

  • 我已将这些添加到项目中(即它们出现在项目下的解决方案资源管理器中)

  • 我已在属性窗口中将每个文件的“复制到输出目录”设置为“始终复制”。

When I publish the project and re-install it, none of these files are included.

当我发布项目并重新安装它时,这些文件都不包含在内。

Any help would be appreciated. Thanks in advance.

任何帮助,将不胜感激。提前致谢。

采纳答案by Dimitris Sapikas

From build action you should select "content"

从构建操作中,您应该选择“内容”