Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 782343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:22:18+00:00 2026-05-14T20:22:18+00:00

I tried making a custom configuration class that went on like this: WatcherServiceInfoSection<TWatcherServiceDetailElement> where

  • 0

I tried making a custom configuration class that went on like this:

WatcherServiceInfoSection<TWatcherServiceDetailElement>

where TWatcherServiceDetailElement is a ConfigurationElement inside it.

Now when I call the type in the ConfigSections area of AppConfig I get the error:

An error occurred creating the configuration section handler for WatcherServiceInfo: 
Could not load type 'Library.Common.Utilities.ConfigurationHandler.WatcherServiceInfoSection<ASNDPService.Configuration.WatcherServiceDetailElement>' from assembly

Is what I’m doing possible? Can I have generic types in the type attribute for a custom section element?

EDIT

Additionally, how about ConfigurationElementCollection objects? Like in the above example, how could I do a

[ConfigurationProperty("WatcherServiceDetails", IsRequired = true, 
IsDefaultCollection = true)]
[ConfigurationCollection(typeof(TWatcherServiceDetailElement), AddItemName = "WatcherServiceDetail")]
public WatcherServiceDetailCollection<TWatcherServiceDetailElement> WatcherServiceDetails

I’m aware that type parameters aren’t allowed for attributes and that’s what I want to know how to do.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T20:22:19+00:00Added an answer on May 14, 2026 at 8:22 pm

    you need to specify the full name of the type.

    This includes the full name of the generic type followed by a ` and the number of generic type parameters with the full names of the type parameters in [...]

    e.g.

    <component id="FooRetriever"
               service="Namespace.IRetrievable`2[[Namespace.Foo, Assembly],[System.String]], Assembly"
               type="Namespace.FooRetriever, Assembly"/>
    

    I will try to whip up a more reasonable example.

    see http://theburningmonk.com/2010/03/castle-windsor-tips-specifying-generic-types-in-config-file/

    also see Including a generic class in Unity App.Config file

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried making a wrapper class that encapsulates an object, a string (for naming
I tried making custom tags so that uses can enter text that displays something
I have tried making a fiddle for this, but it's been too difficult to
I have tried and tried to achieve an SQL injection by making custom queries
How do I fix this navigation bar? I tried making it on my own
I'm making a custom ListCellRenderer. I know that you can have different dimensions for
How to create a custom login system with google-app-engine's User class? I'm making my
I'm making a plugin that does a custom query on the WordPress database, and
I tried making a custom command for my terminal. I'm running Mac OS X
Our app depends on an external, 3rd party-supplied configuration (including custom driving/decision making functions)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.