John B
John B

Reputation: 33

Adding Text Files to My Project

I have developed a VB.NET application that generates code in a specific format. It has a multitude of features and everything works great. I recently added the ability to save generated code to a text file as well as the ability to load those text files into the application. I am looking to add one last feature (perk). I want to include a bunch of pre-coded text files with the application, that new users can load and use immediately. As of right now I have the application creating the directory they will go in, but can't find anything on how to include the text files and have them placed in that directory. This application uses one-click deployment (in case that matters). Any help would be greatly appreciated.

Upvotes: 1

Views: 523

Answers (1)

TehBoyan
TehBoyan

Reputation: 6890

First go to solution explorer and click Show All Files in the top menu. Then on each file you want to include right click and select Include In Project.

After you do that you need to go to properties of the .txt files in the Properties window in Visual Studio and set BuildAction as Content.

Upvotes: 1

Related Questions