Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

Compiling an XML configuration file in a WPF program

$
0
0

I have a WPF program that I want to be easily modifiable in the future.  Thus, I want to use an XML (not XAML) file to configure the content for different pages that could be displayed in the program.  I can make the program load the XML configuration file at runtime, but if my configuration file just sits in the program folder, anyone could modify the file, regardless of the extension I give it.  For security reasons, I want to prevent clients from doing this.

One option is to encrypt the XML file, but I was hoping there was a way to avoid having an XML configuration file in the program folder at all.  My question is this:

Is there a way for Visual Studio to reference my XML configuration file when it compiles the program so that the pages described in the configuration file are actually loaded and stored within the executable at compile time?

I don't know if this is even possible, but I wanted to see if anyone knew whether it was or not, and if it is, how to do it.  Thanks for your help!


Viewing all articles
Browse latest Browse all 21115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>