Unable to find type ...ServiceFault in EntLib V5 Config tool

Topics: Enterprise Library Core, General discussion
Nov 3, 2010 at 1:20 PM

I'm configuring a FaultContractExceptionHandler using the Enterprise Library V5 Configuration editor (from VS2010).  I've added my custom Fautl Contract Type using the ... dialog box, Add from File and browsing to the DLL in the project's bin folder.  The box is highlighted in red and the tool tip reads: "Unable to find type Xxx.Web.Faults.ServiceFault, Xxx.Web, Version=, Culture=neutral,PublicKeyToekn=null."  The same message appears in the info section at the bottom of the editor window.

Everything works fine, so it appears to be a problem with the editor.

Nov 3, 2010 at 2:39 PM

Had a similar problem with VS 2010 refusing to allow me to add a service class to my project.  The solution is the same: a post-build event to copy the DLL.  In this case, it looks like this:

xcopy "$(TargetPath)" "C:\Program Files (x86)\Microsoft Enterprise Library 5.0\Bin\" /I /Y /D

It's a bit cludgy but the red box and the warnings go away and that'll do for now.

Apr 19, 2012 at 11:26 AM

I've got the same problem again, now I've moved to using NuGet but I can't work out how to fix it, this time.  I've installed the EnterpriseLibrary.Config extension to Visual Studio 2010.

I've tried copying the assembly containing the class to


to no avail.  The assembly is a Portable Class Library assembly.

Apr 19, 2012 at 4:39 PM

The EnterpriseLibrary.Config tool is bit nicer from an extensibility point of view than the standard configuration tool.  Now you can configure the tool to locate your custom additions instead of deploying to the config tool bin folder.

Here are the steps:

  1. Open the project in VS2010
  2. Select (left click) the solution in Solution Explorer
  3. Open the properties window (F4) (not right click properties)
  4. There will be a property called "Enterprise Library binaries paths"
  5. Add any custom binaries paths for your custom types (all paths separated by a semicolon) to that property

Now when the EnterpriseLibrary.Config tool is launched it should pick up valid configuration items from the binaries paths specified.  This should eliminate warning messages and the types should also automatically appear in the appropriate UI elements (e.g. type picker).

Randy Levy
Enterprise Library support engineer

Apr 19, 2012 at 8:34 PM

Brilliant!  That's working fine, thank you.