Config files embedded in exe
-
Since it's really easy to access resources and modify them in .net, what do people think about storing application configs inside of the .exe itself (maybe storing the first date the program was ran inside of the executable itself, granted it's easy to modify, but I'm sure other methods will be used as well). Anybody have any thoughts on this? good idea? bad idea? I just think it might be nice to have an executable with no attachment to the registry and no other required files (sans runtimes).
-
Since it's really easy to access resources and modify them in .net, what do people think about storing application configs inside of the .exe itself (maybe storing the first date the program was ran inside of the executable itself, granted it's easy to modify, but I'm sure other methods will be used as well). Anybody have any thoughts on this? good idea? bad idea? I just think it might be nice to have an executable with no attachment to the registry and no other required files (sans runtimes).
To my opinion the general purpose of such configuration file is the ability to manipulating an application’s behavior whenever necessary. I am not sure if you could modify a .NET exe/dll file without reconstructing. Perhaps it is possible to use Soap/Binary Serialization in combination with PropertyGrid and a command line argument to do the trick. This way you create a “PropertyGrid enabled” class that holds the configuration, then you Serialize and/or DeSerialize the class when the application starts with a startup argument like /conf Any way, this is my opinion.
C:\>csc *.cs Microsoft (R) Visual C# .NET Compiler error CS2001: Source file 'brains.cs' could not be found fatal error CS2008: No [brains.cs] specified C:\>