This (seemingly) simple item has escaped me after pouring over tons of
posts about ClickOnce. How does one add a config file
(myapp.exe.config) to the list of executables and dlls that get
published with a ClickOnce application? All I want to do has have a
standard config file get dropped down in the folder where the
application gets run from. I don't want to have to edit the manifest
every time I publish. When you go to the publish tab in the project
settings and click on the "Application Files" button, it seems to find
the EXE, and DLLs correctly. How can I make sure that my config file
gets added to that list as well? TIA

Roy

Re: ClickOnce - How to add config file to list of files that get published by Andy

Andy
Wed Nov 29 13:47:47 CST 2006

Did you try clicking the Applications Files button? Normally though if
your have an App.config in your solution, it will automatically pick
up the config file for clickonce.

HTH
Andy

roybrew@att.net wrote:
> This (seemingly) simple item has escaped me after pouring over tons of
> posts about ClickOnce. How does one add a config file
> (myapp.exe.config) to the list of executables and dlls that get
> published with a ClickOnce application? All I want to do has have a
> standard config file get dropped down in the folder where the
> application gets run from. I don't want to have to edit the manifest
> every time I publish. When you go to the publish tab in the project
> settings and click on the "Application Files" button, it seems to find
> the EXE, and DLLs correctly. How can I make sure that my config file
> gets added to that list as well? TIA
>
> Roy


Re: ClickOnce - How to add config file to list of files that get published by roybrew

roybrew
Thu Nov 30 09:24:28 CST 2006

Uh, yeah. I clicked the button. That's how I found my exe and dlls
listed. Does the config file actually need to be named "App.config" or
can it be called MyApp.exe.config?

roy

Andy wrote:
> Did you try clicking the Applications Files button? Normally though if
> your have an App.config in your solution, it will automatically pick
> up the config file for clickonce.
>
> HTH
> Andy
>
> roybrew@att.net wrote:
> > This (seemingly) simple item has escaped me after pouring over tons of
> > posts about ClickOnce. How does one add a config file
> > (myapp.exe.config) to the list of executables and dlls that get
> > published with a ClickOnce application? All I want to do has have a
> > standard config file get dropped down in the folder where the
> > application gets run from. I don't want to have to edit the manifest
> > every time I publish. When you go to the publish tab in the project
> > settings and click on the "Application Files" button, it seems to find
> > the EXE, and DLLs correctly. How can I make sure that my config file
> > gets added to that list as well? TIA
> >
> > Roy


Re: ClickOnce - How to add config file to list of files that get published by Andy

Andy
Thu Nov 30 10:19:05 CST 2006

In your project it should be called App.Config. When you build, VS
will automatically rename that file to whatever the configuration
should be called after it copies the file to the bin folder.

HTH
Andy

roybrew@att.net wrote:
> Uh, yeah. I clicked the button. That's how I found my exe and dlls
> listed. Does the config file actually need to be named "App.config" or
> can it be called MyApp.exe.config?
>
> roy


Re: ClickOnce - How to add config file to list of files that get published by roybrew

roybrew
Thu Nov 30 11:41:12 CST 2006

Thanks Andy. I was also able to add the config file as it was named
(i.e. myaapp.exe.config) and give it a build action of "Content" and
make sure it was copied to the output directory. This also added it to
the list of Application files. But your way is cleaner and appears to
be the standard way, so I'll use that. Thanks again for the help.

roy


Andy wrote:
> In your project it should be called App.Config. When you build, VS
> will automatically rename that file to whatever the configuration
> should be called after it copies the file to the bin folder.
>
> HTH
> Andy
>
> roybrew@att.net wrote:
> > Uh, yeah. I clicked the button. That's how I found my exe and dlls
> > listed. Does the config file actually need to be named "App.config" or
> > can it be called MyApp.exe.config?
> >
> > roy