开发者

can we edit visual studio app.config file in any text editor?

I have a configuration file in my visual studio application called app.config.

 <add key="Duration" value="3"/><!-- i will edit value 开发者_如何学JAVAas 2 in this file-->

Up to now i edited in notepad and its working fine but i tried with word pad.Here i'm

getting exception like"The type initializer for 'System.Windows.Application' threw an

exception." and an error like "Application Configuration file "App.config" is invalid.

Invalid character in the given encoding." Any one tell me why whats wrong with that

approach.How to rectify it.Please answer this.

Thanks in advance.


Any editor that can edit & save text files will work.

The problem with Word Pad is it's probably trying to save "rich" information (font size etc) with the text, once this happens the file is no longer a "plain text" file, but is some kind of rich document e.g. Word Doc, RTF file or other.

There should be an option when saving the document to save it without formatting, and just save it as a text file.

However, your better off using a text editor, such as notepad. Personally I use Notepad++.


When using word pad, before you save, look at the type box at the bottom of the save dialog, you need to set it to unicode text, rather than rich text.


The config file is a simple text file. You can use Notepad to edit it.

Wordpad is also saving some styles information in the file, so you cannot use it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜