Cannot find missing reference
I am trying to copy code from one project to another. There is one problem however:
The type 'Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase' is defined in an assembly that is开发者_开发知识库 not referenced. You must add a reference to assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null'.
The problem is that I can't find Microsoft.Practices.* anywhere. Anyone know where I can find this file?
If you're trying to copy code from a working project, then that code must already have a reference to Microsoft.Practices.EnterpriseLibrary.Data
. Find the reference in Visual Studio and look at its properties.
you need to install EnterpriseLibrary.
From MSDN:
The Microsoft Enterprise Library is a collection of reusable software components (application blocks) designed to assist software developers with common enterprise development cross-cutting concerns (such as logging, validation, data access, exception handling, and many others). Application blocks are a type of guidance; they are provided as source code, test cases, and documentation that can be used "as is," extended, or modified by developers to use on complex, enterprise-level line-of-business development projects.
See the 'Downloads' section here and choose "Enterprise Library 3.1 May 2007 (for .NET Framework 2.0 and 3.0)."
精彩评论