问题
We have a VB6 application which launches .NET WinForms code. We'd like to use a .settings file in the .NET assembly for storing user-specific application settings.
MS says:
You cannot use application settings in an unmanaged application that hosts the .NET Framework. Settings will not work in such environments as Visual Studio add-ins, C++ for Microsoft Office, control hosting in Internet Explorer, or Microsoft Outlook add-ins and projects.
How can we get this working so we can use a .settings file? Or can someone suggest an alternative? I know we could write our own settings manager and serialize a hashtable or something like that to/from isolated storage...but I'm hoping for something easier for our dev team to work with.
来源:https://stackoverflow.com/questions/7948936/applicationsettings-in-net-from-unmanaged-application