By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,683 Members | 1,398 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,683 IT Pros & Developers. It's quick & easy.

UTF-8 changes to Windows-1252 in config file

P: n/a
Suddenly, the encoding in my exe.config file changes from UTF-8 to
Windows-1252 every time I try to debug my winform app. This causes the old
application configuration error when I try to debug the app. How can I
finally convince my exe.config file to keep straight?
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Have you tried making it read-only?
"Lisa" <sp*********@herplace.com> wrote in message
news:Uo********************@eatel.net...
Suddenly, the encoding in my exe.config file changes from UTF-8 to
Windows-1252 every time I try to debug my winform app. This causes the old application configuration error when I try to debug the app. How can I
finally convince my exe.config file to keep straight?

Nov 20 '05 #2

P: n/a
Good idea, but making the config file read-only results in this error
message in the debugger:

app.config: Error copying the application configuration file to the run
directory. Access is denied. Could not copy temporary files to the output
directory.

Grrr
"Stephen" <gr******@bellatlantic.net> wrote in message
news:eL**************@TK2MSFTNGP11.phx.gbl...
Have you tried making it read-only?
"Lisa" <sp*********@herplace.com> wrote in message
news:Uo********************@eatel.net...
Suddenly, the encoding in my exe.config file changes from UTF-8 to
Windows-1252 every time I try to debug my winform app. This causes the

old
application configuration error when I try to debug the app. How can I
finally convince my exe.config file to keep straight?


Nov 20 '05 #3

P: n/a
Lisa,
Are you using VS.NET 2002 or VS.NET 2003?

Where are you setting the format to UTF-8?

Because of the ability to set which version of the runtime should be used,
VS.NET 2003 always replaces the app.config in the output folder.

You need to add your config file to your VS.NET project's root folder as
app.config, it needs to be named "app.config" without the quotes. When you
build your project VS.NET (both 2002 & 2003) will copy the app.config file
from the project root to your output folder and name it appropriately
(myproject.exe.config).

My concern is you have a copy of the app.config in your project, but you
saved a UTF-8 copy in the output folder. Which will cause it to be replaced
when you build. Or you have a UTF-8 app.config in your project & VS.NET is
changing the format when it copies...

Hope this helps
Jay
"Lisa" <sp*********@herplace.com> wrote in message
news:As********************@eatel.net...
Good idea, but making the config file read-only results in this error
message in the debugger:

app.config: Error copying the application configuration file to the run
directory. Access is denied. Could not copy temporary files to the output directory.

Grrr
"Stephen" <gr******@bellatlantic.net> wrote in message
news:eL**************@TK2MSFTNGP11.phx.gbl...
Have you tried making it read-only?
"Lisa" <sp*********@herplace.com> wrote in message
news:Uo********************@eatel.net...
Suddenly, the encoding in my exe.config file changes from UTF-8 to
Windows-1252 every time I try to debug my winform app. This causes the
old
application configuration error when I try to debug the app. How can

I finally convince my exe.config file to keep straight?



Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.