In my asp.net solution i have a couple of class library-projects that act as modules of the site.
In main project I have SiteConfigurationSection class that derives from ConfigurationSection.I want all projects to be able to access an开发者_如何学JAVAd use this SiteConfigurationSection.
But class library projects can't access it because they obviously don't have a reference to the website itself.Should create a special library-project for SiteConfigurationSection of maybe it's better to create a mini SiteConfigurationSection class in every project and encapsulate only the needed values?
Creating a common assembly for things like shared configuration types, shared interfaces, domain objects etc. is the appropriate action.
Just create a separate class library and reference it in each project that needs to read the configuration.
精彩评论