Take the 2-minute tour ×

I'm developing some Excel UDFs via .Net Automation Add-in (Visual Studio 2010, .Net 4.0, C#). My functions validate the parameters that get passed using EntLib 5.0 Validation block. This works fine with attributed parameter properties but I'd like to move the validation rules into a configuration file. What are my options for doing this? A sample winforms app works just fine with its app.config file but where would an office automation add-in load its configuration from? Does this requires a similar approach to DLL configuration files?

As a bonus has anyone used the Validation block library with rules loaded from a database table? That would be really cool.

share|improve this question
add comment

1 Answer

I have used EntLib 5.0 for Unity, Exception and Logging in Excel Addins. It works similar to DLL configuration files. I havent used Validation block.

share|improve this answer
Would you have an example? –  Kevin Roche Mar 27 '12 at 14:32
I followed the Hands on lab available when you install Enterprise Library. You can use the GUI(after installing EntLib5 right click your app.config file) to edit your config files which makes things easier. –  Kiru Mar 27 '12 at 14:39
add comment

Your Answer


