[英]How to include hidden file with Visual Studio 2012
I have a file that I have included for a project, when compiled the file is created on the build directory. 我有一个项目包含的文件,编译后会在构建目录中创建该文件。 How to include the file directly in the .exe?
如何将文件直接包含在.exe中?
You'll want to look at working with Embedded Resources , which are files (content, either text or binary) that get embedded into the assembly during compilation: 您将要研究使用Embedded Resources ,它们是在编译过程中嵌入到程序集中的文件(内容,文本或二进制文件):
From MSDN: 从MSDN:
To change a resource from linked to embedded
将资源从链接更改为嵌入式
With a project selected in Solution Explorer, on the Project menu, click Properties.
在解决方案资源管理器中选择一个项目后,在“项目”菜单上,单击“属性”。
Click the Resources tab.
单击资源选项卡。
On the Resource Designer toolbar, point to the resource view drop-down, click the arrow, and select the type of resource that you want to edit.
在“资源设计器”工具栏上,指向“资源视图”下拉菜单,单击箭头,然后选择要编辑的资源类型。
Select the resource that you want to change.
选择您要更改的资源。
In the Properties window, select the Persistence property and change it to Embedded in .resx.
在“属性”窗口中,选择“持久性”属性,然后将其更改为“嵌入在.resx中”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.