zoukankan      html  css  js  c++  java
  • [EntLib]解决The type or namespace name 'Data' does not exist in the namespace 'Microsoft.Practices.EnterpriseLibrary' 的错误

    在使用EnterpriseLibrary的Data Access Application Block时,需要添加Microsoft.Practices.EnterpriseLibrary.Common

    Microsoft.Practices.EnterpriseLibrary.Data

    Microsoft.Practices.ServiceLocation

    Microsoft.Practices.Unity

    四个Dll的引用

    但使用VS2010编译时还是会报错:The type or namespace name 'Data' does not exist in the namespace 'Microsoft.Practices.EnterpriseLibrary' (are you missing an assembly reference?)

    解决方法:

    在官方codeplex的discussions中找到:

    To short circuit digging through that other thread - the Data block only works if you target the full .NET framework. By default, client projects in VS 2010 target the .NET Client profile. Go into your project properties and change your target framework to .NET Framework 4.0 instead of client profile and it should work.

    即Visual Studio 2010在编译时默认在客户端使用.NET Client框架,而上面丢失的引用位于完整的.NET Framework 4.0中,所以在项目属性中将Target framework设置为.NET Framework 4再执行编译即可。

  • 相关阅读:
    JavaScript
    格式与布局
    表单和样式表
    HTML中表格的使用
    HTML 基础
    foreach使用和函数
    20160423 二维数组,锯齿数组和集合
    【学习笔记】系统集成项目管理
    BSEG和BSIS、BSAS、BSID、BSAD、BSIK、BSAK六个表的关系(转)
    关于ABAP事件的一张图
  • 原文地址:https://www.cnblogs.com/chocstarfish/p/1967823.html
Copyright © 2011-2022 走看看