in

ASP.NET Weblogs

Li Chen's Blog

PublicSettingsSingleFileGenerator

I added a Settings.settings file in one of my library project and I want to use the settings in my ASP.NET application. Unfortunately, the Settings class in Settings.Designer.cs is created as internal sealed partial class so that my ASP.NET application in a different assembly cannot see the class. Fortunately, to make the Settings class public, all I need to to is to go to the properties of Settings.settings file and change the Custom Tool from SettingsSingleFileGenerator to PublicSettingsSingleFileGenerator.

Published Oct 27 2010, 11:04 PM by dotneteer
Filed under: ,

Comments

 

amissico said:

To do the same thing using the settings designer, just change the "Access Modifier" of the "Settings.settings" file.

December 28, 2010 5:23 PM

Leave a Comment

(required)  
(optional)
(required)  
Add