Gabe Steffe
Gabe Steffe

Reputation: 167

Why can't I find the Enterprise assemblies that I need to reference?

I am working on an Visual Studio application and I want to use the Data Access Application Block, which is a part of the Microsoft Enterprise library 5.0. I have been following the steps in this guide to install the Data Access Application block. There is a step on this page that asks me to reference the following assemblies:

Microsoft.Practices.EnterpriseLibrary.Data.dll

Microsoft.Practices.EnterpriseLibrary.Common.dll

Microsoft.Practices.Unity.dll

Microsoft.Practices.ServiceLocation.dll

Microsoft.Practices.Unity.Interception.dll

The problem is that when I try to add them, I don't see them listed anywhere in the Reference Manager.

Can anybody explain to me why I do not see them / how I can find them?

Thanks

Upvotes: 1

Views: 2442

Answers (1)

Randy Levy
Randy Levy

Reputation: 22655

The easiest way to download the assemblies you need is to use NuGet to install the Data Access Application Block.

In Visual Studio (not sure what version you are using -- this is for Visual Studio 2013) go to the Menu and select Tools->NuGet Package Manager->Package Manager Console. The console should appear. If it doesn't then select View->Other Windows->Package Manager Console.

Next at the Package Manager Console type:

PM> Install-Package EnterpriseLibrary.Data -Version 5.0.505

This installs the previous (version 5) Data Access Application Block and all its dependencies. You should see the following in the Package Manager Console

Attempting to resolve dependency 'EnterpriseLibrary.Common (≥ 5.0)'.
Attempting to resolve dependency 'Unity.Interception (≥ 2.1)'.
Attempting to resolve dependency 'Unity (≥ 2.1)'.
Attempting to resolve dependency 'CommonServiceLocator (≥ 1.0)'.
Installing 'CommonServiceLocator 1.0'.
Successfully installed 'CommonServiceLocator 1.0'.
Installing 'Unity 2.1.505.0'.
You are downloading Unity from Microsoft patterns & practices, the license agreement to which is available at http://www.opensource.org/licenses/ms-pl. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Unity 2.1.505.0'.
Installing 'Unity.Interception 2.1.505.0'.
You are downloading Unity.Interception from Microsoft patterns & practices, the license agreement to which is available at http://www.opensource.org/licenses/ms-pl. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Unity.Interception 2.1.505.0'.
Installing 'EnterpriseLibrary.Common 5.0.505.0'.
You are downloading EnterpriseLibrary.Common from Microsoft, the license agreement to which is available at http://www.opensource.org/licenses/ms-pl. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'EnterpriseLibrary.Common 5.0.505.0'.
Installing 'EnterpriseLibrary.Data 5.0.505.0'.
You are downloading EnterpriseLibrary.Data from Microsoft, the license agreement to which is available at http://www.opensource.org/licenses/ms-pl. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'EnterpriseLibrary.Data 5.0.505.0'.
Adding 'CommonServiceLocator 1.0' to ConsoleApplication1.
Successfully added 'CommonServiceLocator 1.0' to ConsoleApplication1.
Adding 'Unity 2.1.505.0' to ConsoleApplication1.
Successfully added 'Unity 2.1.505.0' to ConsoleApplication1.
Adding 'Unity.Interception 2.1.505.0' to ConsoleApplication1.
Successfully added 'Unity.Interception 2.1.505.0' to ConsoleApplication1.
Adding 'EnterpriseLibrary.Common 5.0.505.0' to ConsoleApplication1.
Successfully added 'EnterpriseLibrary.Common 5.0.505.0' to ConsoleApplication1.
Adding 'EnterpriseLibrary.Data 5.0.505.0' to ConsoleApplication1.
Successfully added 'EnterpriseLibrary.Data 5.0.505.0' to ConsoleApplication1.

The other way would be to download Enterprise Library and then reference the individual assemblies from the install location.

Upvotes: 1

Related Questions