How to use app.config with Visual Studio add-in?
问题 I'm building a simple VS2008 add-in. What is the best practice for storing custom run-time settings? Where do you store the app.config and how do you access it from the add-in? 回答1: Try something like this with System.IO.IsolatedStorageFile (haven't tested sample code.. it's just to show the idea) Writing using (IsolatedStorageFile file = IsolatedStorageFile.GetUserStoreForAssembly()) { using (StreamWriter stream = new StreamWriter(new IsolatedStorageFileStream("YourConfig.xml", FileMode