Asp.net 为什么找不到需要引用的企业程序集?

Asp.net 为什么找不到需要引用的企业程序集?,asp.net,visual-studio,.net-assembly,enterprise-library,Asp.net,Visual Studio,.net Assembly,Enterprise Library,我正在开发一个VisualStudio应用程序,我想使用Data Access应用程序块,它是Microsoft Enterprise library 5.0的一部分。我一直在按照中的步骤安装数据访问应用程序块。上有一个步骤要求我引用以下程序集: Microsoft.Practices.EnterpriseLibrary.Data.dll Microsoft.Practices.EnterpriseLibrary.Common.dll Microsoft.Practices.Unity.dll

我正在开发一个VisualStudio应用程序,我想使用Data Access应用程序块,它是Microsoft Enterprise library 5.0的一部分。我一直在按照中的步骤安装数据访问应用程序块。上有一个步骤要求我引用以下程序集:

Microsoft.Practices.EnterpriseLibrary.Data.dll

Microsoft.Practices.EnterpriseLibrary.Common.dll

Microsoft.Practices.Unity.dll

Microsoft.Practices.ServiceLocation.dll

Microsoft.Practices.Unity.Interception.dll

问题是,当我尝试添加它们时,在引用管理器中的任何位置都看不到它们

有谁能向我解释为什么我看不到他们/我怎么能找到他们


谢谢

下载所需程序集的最简单方法是安装

在Visual Studio中,不确定您正在使用的版本-这是针对Visual Studio 2013的,请转到菜单并选择工具->NuGet Package Manager->Package Manager Console。控制台应该出现。如果没有,则选择查看->其他窗口->软件包管理器控制台

接下来,在Package Manager控制台键入:

PM>安装EnterpriseLibrary.Data包-版本5.0.505

这将安装早期版本5数据访问应用程序块及其所有依赖项。您应该在PackageManager控制台中看到以下内容

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.

另一种方法是从安装位置访问并引用各个程序集。

EntLib必须从CodePlex项目站点下载,然后您可以学习如何安装程序集。它们不随Visual Studio一起提供。