I have a console app that should, when given a particular command-line argument, write a skeleton configuration file for my app to a specified directory. Currently, that skeleton config file now lives in my assembly (under a t4 template that I use to generate it at compile time).
When my app is run with the relevant argument, I want to be able to load the results of my t4-processed config file into memory at run time and then write it to an arbitrary location on disk.
I can't figure out how to reference and load the file in my solution in my C# code. Is it even possible to embed a file resource like this into an assembly and reference it from code? Or do I need to put the file on the filesystem as part of an install process? I'd rather not have to do the latter if possible.
Any help or advice would be most appreciated. :)