Enterprise Library Config Console and Custom application block

Topics: Building and extending application blocks
Dec 7, 2010 at 4:12 PM
Edited Dec 7, 2010 at 8:25 PM


@ctavares

In another post you mention:
"The config tool is now metadata driven, so you won't need to write the design-time nodes anymore unless you want to build something seriously customized."

-Are the Design ViewModels needed?
-Does the DLL of the custom application block need to be placed in the bin directory of the config tool?
-Do any XML files need to be added\updated?

Dec 8, 2010 at 3:36 AM

- Are the Design ViewModels needed?

For a custom block, yes, you will need a ViewModel. Typically it'll just be one class unless you're doing some funky layout stuff.

-Does the DLL of the custom application block need to be placed in the bin directory of the config tool?

Yes, this still holds true - if you don't do this, the config tool won't be able to load the custom block and know that it's there.

-Do any XML files need to be added\updated?

No.

 

Jan 6, 2011 at 10:00 PM
ctavares wrote:

- Are the Design ViewModels needed?

For a custom block, yes, you will need a ViewModel. Typically it'll just be one class unless you're doing some funky layout stuff.

-Does the DLL of the custom application block need to be placed in the bin directory of the config tool?

Yes, this still holds true - if you don't do this, the config tool won't be able to load the custom block and know that it's there.

-Do any XML files need to be added\updated?

No.

 

Where do I have to place the ViewModel class?  I see the SecuritySectionViewModel inherits from SectionViewModel which is in Microsoft.Practices.EnterpriseLibrary.Configuration.Design.ViewModel.BlockSpecifics.  Do I have to add my ViewModel (PasswordAgingViewModel) into Configuration.Common?  I would think my application block would be able to be independent for design time support and not need to be added to any existing Entlib project.

Let me know.

Jan 10, 2011 at 1:13 AM

The view model class needs to be in an assembly in the same directory with the config tool executable. That's the only requirement. We put all the design time stuff for the core Entlib blocks into one assembly to cut down on the number of assemblies in the package, but you can put yours wherever you want. You can put it in the assembly with your run-time code or have a separate design time assembly. Doesn't matter.