Not all blocks showing up in EntLibConfig

Topics: User Discussion
Nov 15, 2011 at 5:00 AM

After I drop the latest download of the Ent Lib Contrib into the the Microsoft Enterprise Library 5.0\Bin folder most of the blocks are missing from the list of blocks in the EntLibConfig. I've tried the various versions but they all only show Application, Configuration and Instrumentation bloks. I'm tying to use the MySQL data source.

Any clues why the rest of the blocks aren't showing up?

MArk B>

Coordinator
Nov 15, 2011 at 3:37 PM

Hi Mark,

it's mostly related to the version of EntLib not being the right one. EntLibContrib was compiled against the latest bits of EntLib (5.0.505.0) which can be downloaded through NuGet.

I would therefore strongly recommend you to simply use NuGet and reference the EntLibContrib MySQL Data Provider package and let NuGet deal with resolving all the dependencies for you.

Cheers,

Jeremi

Nov 16, 2011 at 4:30 PM

Hi Jaremi,

Thanks for the help. I now get what NuGet is for. [Get it? :-)]

It's still not working for me though. Even after bouncing around with the installing and uninstalling various versions for a couple of hours and finally finding the Configuration editor thing in NuGet it's still only showing those same three blocks.

I checked the versions on all of the references from the EntLib in the project and they are all 5.0.505.0. I added all of those with NuGet too. I'm not sure what version the config editor is but it said in NuGet, as you know, that it's the same version.

One note: It didn't have the same name as the one installed with the EntLib 5.0. This one says: "Edit Server configuration file".

MArk B.

Nov 16, 2011 at 4:39 PM

Hi again.

I just did a fresh install on a machine that has never had the enterprise library or anything related installed on it.  I installed NuGet, the configuration editor utility and the common block of the Enterprise Library and used them on a brand new project.

Is it possible that the bits is busted?

MArk B.

Coordinator
Nov 16, 2011 at 5:08 PM

Hi Mark,

If you installed EntLib through the MSI, then the 5.0.414.0 assembly were installed in the GAC (+ a matching version of the config tool). Those binaries are NOT compatible with ELContrib 5.

If you installed EntLib through NuGet, then your project will reference the 5.0.505.0. If you want config support, you need to install the matching version of the config tool (5.0.505.0) through the Extention Manager in VS. This new version of the tool (available when you right click on your app.config file) is compatible with ELContrib.

Let me know if that helped.

Cheers!

Jeremi

Nov 16, 2011 at 7:30 PM

Hi Jeremi,

On the first machine, I did an uninstall of the MSI and then used the Extension Manager to get the 5.0.505.0 version of the config tool and everything else. I ended up in the same place.

I then went to another machine that had never had the Enterprise Library or any of the ELContrib items installed on it. I started with the Extension Manager and got the NuGet tool. I then used that to get the config tool. I tried to run that but it said I didn't have any of the libraries to run it against. (I didn't and I knew that) I then went in and used NuGet to get the Enterprise Library Common. It installed several things including Unity. I then ran the config tool and had the same result. Everything says it's 5.0.505.0 on both machines. That is except the config tool which doesn't say which version is installed except via NuGet. That does say it's the same version. I did this all on a brand new WebApplication.

Oh, and I am right clicking on the web.config file and that's where it says the name of the application is "Edit Server configuration file".

One other thing. All of the libraries seem to be installed in the wrong folder. For example: "C:\Temp\projexts\LocaizationDemo\WebApplication1\packages\EnterpriseLibrary.Common.5.0.505.0\lib\NET35\Microsoft.Practices.EnterpriseLibrary.Common.dll" I say that because the project is set to use .NET 4.0.

Another clue. I just checked the digital signature of the file above and it says it was signed "Monday, May 09 2011 4:16:36 PM". Isn't that when the 414 build came out? Heck, the certificate even expired as of 10/19/2011.

MArk B.

Coordinator
Nov 16, 2011 at 7:42 PM

Hi Mark,

Regarding the tool, only the blocks that are referenced in your current project will show up. However, there is nothing configurable in the Common assembly. Try adding the Logging block. Or the Query block from ELContrib.

Here more details on how the tool work. When launching the tool from the contextual menu of the web.config file, it will look and load all the blocks that are in the folders defined by the "Enterprise Library binaries paths" solution property. This property is updated everytime you add a new EntLib package to your project by a Powershell script shipped with the packages..

About the framework version, all current EntLib assemblies (including the ELContrib ones) are targetting v3.5. So they can be referenced by both 3.5 and 4.0 project without any problem.

Regarding version 414, it was release in May 2010. And 505, one year later (Monday, May 09 2011 4:16:36 PM) with some updates related to the Silverlight Integration Pack.

Regards,

Jeremi

Nov 16, 2011 at 8:12 PM

Thanks a lot Jaremi.

I've got some of it working here at work. I think I've figured out what was going on. I'll check more into it when I get to the machine at home. It seems that if I use the NuGet and select the items from just the EntLibContrib it takes care of all the dependencies and I end up not screwing up anything.

BTW: This all comes back to me needing to access a MySQL database. I figured I'd use the DAAB because, well, it's there.

Thanks again.  I'll let you know what happens if I can get some time on the machine tonight.

MArk B.

Coordinator
Nov 16, 2011 at 8:25 PM

Glad to hear that.

Regarding the MySQL Data Provider, look for the quick start project in the source zip file available in the Download section (you'll might need to add additional stuff in your config). Or simply browse the source tree from the Source Code section.

Cheers!

Jeremi

Nov 18, 2011 at 5:01 AM

YAY!

Thanks Jeremi. I finally have it running at home. I've got the editor running. I've got it connecting to the database again. (Well, the security provider is working anyway) Next thing is to look into that exaple project for the MySQL Data Provider.

I greatly appreciate the help. I'll keep plugging along.

MArk B.