Embedding the app.config into the exe

karl_ranseier

New member
Joined
Feb 24, 2008
Messages
3
Programming Experience
3-5
Hi,

i am writing a windows application which accesses a webservice. all the properties of the webservice is written into the app.config automatically by Visual Studio.
This config-file will be copied into the release-folder when compiling the project. you have to ship this config-file, otherwise you windows application will not run.

i want to get rid of this config file. is it possible to set all these webservice properties "by hand" in the sourcecode? or is it possible to embed the config-file into the exe? using the property "embedded resource" of the app.config doesn't work. it produces the same error that you get when you didn't ship the config-file.

thank you in advance
 
Put the config file into the exe file, and set the file's 'Copy to output" property to 'Copy if newer" and there ya go
 
Put the config file into the exe file, and set the file's 'Copy to output" property to 'Copy if newer" and there ya go

this does not work. i have already tested it.

i have put the build-property to "resource" or to "embedded resource" and the output-property to "copy to output".
i get an error when accessing the webservice via my windows application.
 
Have you tried setting the output-property to "copy to output" and not changing the build-property to "resource" or to "embedded resource"?
 
Karl, did you solve this? or can anyone? I'm trying the same thing. would be helpful to the me + community if you could post whether a resolution is possible or not (and if so, what it was!) cheers, ewart.
 
Back
Top