Microsoft Enterprise Library 5.0

– released april 2010

– download and run the msi setup which will drop the microsoft compiled and strong named into local\apps\el5\bin

– download source code msi setup and this will bring the source code in if you want to use it or compile it yourself (no need since the microsoft one should do fine).

– to upgrade its too tough to do support old and new version, so its best to rewrite assembly at a time so there’s no need to do the gac dance. just reference the new version and start fixing the code

“No Enterprise Library quickstarts are supplied with this release. Please use the Enterprise Library Hands-On Labs instead.”

– do yourself a favor and update your smallest DLL first!!!! then when you get the hang of it the rest will go easy!


There is an msi for documentation for inside VS2008 C:\local\apps\EnterpriseLibrary5\Docs\VS2008Docs It might be the same as the standalone .CHM file (don’t forget to unblock it) that you can download separately though.

– bring the binaries into your BIN folder in the project then remove your old namespace

using Microsoft.ApplicationBlocks.Data;
using Microsoft.Practices.EnterpriseLibrary.Data;

object obj = SqlHelper.ExecuteScalar (Images.Util.ConfigSettings.GetImagesConnString(), CommandType.Text, "Select count(*) from images");
string myConnectionString = GetConnectionString();
SqlDatabase db= new SqlDatabase(myConnectionString);
DbCommand cmd = db.GetSqlStringCommand("Select count(*) from images");
Int32 mycount = (Int32)db.ExecuteScalar(cmd);

DbCommand cmd = db.GetSqlStringCommand("Select CustomerID, LastName, FirstName From Customers");
DbCommand cmd = db.GetStoredProcCommand("GetProductsByCategory");


Works in the IDE but the build fails with this error.
c:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(0,0): warning MSB3245: Could not resolve this reference.
Here’s the google answer:
What bugs me about this is that I’m clueless on how this works and why it needs dlls in c:\program files\reference assemblies\microsoft\framework\v3.5. to start with?….!!!

Now after this didn’t work i tried this:

DOH! Oh man, I forgot that the reference to the DLLs is from the build server perspective not my local box. Sillly me. That fixed it.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s