Reputation: 303
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?
Upvotes: 0
Views: 409
Reputation: 50855
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:
From 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.
Upvotes: 1