Config Tool does not load CustomValidator DLL (E.L.v.5 Validation Block)

Topics: Validation Application Block
Aug 30, 2010 at 5:11 PM

Well, according to the Hands On Labs (Ent.Lib v.5), just after the installation, if I simply open the config tool and load the App.config for the Lab11 project, I correctly see the graphic representation of the Validation rule, but as soon as I add a Custom Validator, I have an empty window even if I press Add From File button and browse for the relevant assembly. No use to copy assemblies in the Config tool set folder.

Steps to reproduce:

  1. Install "Hands On Labs"
  2. Open: <user_docs_folder>\Microsoft Enterprise Library 5.0 - Hands On Labs\CS\Validation\exercises\Lab11\After\ValidationHOL.sln
  3. Build & Run - Works as expected
  4. Eventually copy Custom Validator assemblies to the Config Tool folder (<user_docs_folder>\Microsoft Enterprise Library 5.0 - Hands On Labs\Lib)
  5. Open the config tool
  6. Load the Lab11 App.config
  7. Try to add a Custom Validator - the "Browsing for types that derive..." is empty after the "Add From File" button action.

Needless to say, if you try to create a Custom Validator of your own you won't be able to see it in the appropriate window, nor to use it.



Aug 31, 2010 at 7:08 AM

Have you been able to add your custom validator using project other than ValidationHOL (may be your own project)? Also, can you post your custom validator class here so we can further investigate. Thanks

Gino Terrado
Global Technology and Solutions
Avanade, Inc.

Aug 31, 2010 at 8:02 AM

No, I didn't, because it's exactly what I was tring to achieve: using ValidationHOL Lab 11 to create the first custom validator. Can you point me to some other custom validator with design time support sample implementation?

Thank you very much,


Aug 31, 2010 at 9:09 AM
Edited Aug 31, 2010 at 9:16 AM

In the ValidationHOL Lab 11 there is actually a custom validator used there (SSNValidator.cs) which you can use as reference.

You can also refer to the following section found in the documentation;

Extending the Validation Application Block

Enterprise Library Extension Points

Creating a Custom Provider

Also, you can check this blog for some sample.


Hope this helps.

Gino Terrado
Global Technology and Solutions
Avanade, Inc.


Aug 31, 2010 at 9:16 AM

Well, in the end it works. I just made some confusion between Labs 10 and 11. Sorry for the inconvenience.