Visual Studio
.Net Framework 2.0 or later


Open DeployFileGenerator.sln in Visual Studio


edit Program.cs:
Point "sourceFileDirectory" to the directory that holds the files you want to include in your program.
Make sure "resxFile" and "xmlFile" point to directories that your program can write to.


Run this program to build a .resx file and a .xml file from files in the specified folder.

Manually add the .resx file back into this program, then build.
(if necessary change properties - build action to 'Embedded Resource' and Custom tool to 'ResXFileCodeGenerator' - so it will compile. )

The Output file may show something like:
"Processing resource file "DeployFile.resx" into "obj\x86\Release\DeployFileGenerator.DeployFile.resources" ".
(You may have to increase your 'MSBuild project build output verbosity' setting to see this)


You may now close DeployFileGenerator.
Manually add the .resources file into your main Visual Studio Solution.
Manually add the .xml file into your main Visual Studio Solution's 'Resources' folder.
In your main Visual Studio Solution, load 'LibDeployFiles.cs'.
Set up your code to call 'DeployResources' and supply the destination path for the files and 'ProjectName.ResourceFileName'
example: MyProject.DeployFileGenerator.DeployFile.resources

This should deploy the files to the destination.

Last edited Oct 15, 2012 at 9:59 PM by bobrwilliams, version 7


No comments yet.