Bryan's profileBryan Hinton's spacePhotosBlogLists Tools Help

Blog


    9/16/2008

    Programmatically setting the version of the Enterprise Library Configuration Tool for Visual Studio

    I previously wrote about the issue we ran into using Enterprise Library and Unity that caused us to have to roll our own version of the binaries.  The procedure to get the config tool to reference our custom binaries involves changing the EnterpriseLibraryConfigurationSet solution property.  Since we are developing a Starter Kit to be used for new projects starting up here at the Church I wanted to add to our Starter Kit automation the setting of the property to the appropriate value.  Tried as hard as I wanted I couldn't get it to work until I accessed the Solution Property using EntepriseLibraryConfigurationSetPropertyExtender.EnterpriseLibraryConfigurationSet which is how it was listed when I enumerated the property collection. 

    So the one line piece of code to do the job is

    Dte.Solution.Properties.Item("EntepriseLibraryConfigurationSetPropertyExtender.EnterpriseLibraryConfigurationSet").Value = "StackV1EntLib";
    Of course that needs to be accompanied with an entry in the Registry that the StackV1EntLib string can point to which is listed below

    [HKEY_CURRENT_USER\Software\Microsoft\Practices\EnterpriseLibraryV4\ConfigurationEditor\StackV1EntLib]
    "ConfigurationUIAdapterClass"="Microsoft.Practices.EnterpriseLibrary.Configuration.Design.UI.SingleHierarchyConfigurationUIHostAdapter"
    "ConfigurationUIAssemblyPath"="C:\\Program Files\\MSStack\\V1\\StackEntLib\\Microsoft.Practices.EnterpriseLibrary.Configuration.Design.UI.dll"
    "ConfigurationUIPluginDirectory"="C:\\Program Files\\MSStack\\V1\\StackEntLib\\"

    Note: I use this blog to post both Personal and Technical articles.  For a technical only feed use the following URL (http://bryanandnoel.spaces.live.com/category/technology/feed.rss).  For a family only feed use the following URL (http://bryanandnoel.spaces.live.com/category/family/feed.rss)

    Technorati Tags: ,,

    Comments (1)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    No namewrote:
    Thank you.
    HTML clipboard أبطال العرب مكتبة الفيديو ياسرالدوري الإسباني12 الأندية كوره tags
    Sept. 20

    Trackbacks (1)

    The trackback URL for this entry is:
    http://bryanandnoel.spaces.live.com/blog/cns!80E4A0EADF0C523C!1427.trak
    Weblogs that reference this entry