.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

EnterpriseLibraryCoreExtension not recognized

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :ASP.Net

Hi all,
at page 17 of the book "Developer's Guide to Microsoft Enterprise Library" by Microsoft Press, there is the following code:

var theContainer = new UnityContainer().AddNewExtension<EnterpriseLibraryCoreExtension>();

but if I compile my WinForm I got this error:

Error 1 The type or namespace name 'EnterpriseLibraryCoreExtension' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Luigi\Documents\Visual Studio 2008\Projects\FormLib5\FormLib5\Form1.cs 41 69 FormLib5

and I already have the following dll's:

using Microsoft.Practices.EnterpriseLibrary.Logging;
using Microsoft.Practices.EnterpriseLibrary.Common;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using Microsoft.Practices.Unity;

What's wrong with it?

Thanks in advance.


View Complete Post

More Related Resource Links

V1.1 to Beta 2 - Namespaces Not Recognized


We are attempting to test out a website written in VS2003/.Net 1.1 in VS2005 Beta 2/.Net 2.0.  Our main problem at this point is that certain classes are not being recognized when they are referenced in other files not in the same directory as the class file.


A Framework.cs file under \Applications is inherited by several other webpages. It resides under the namespace Company.WebSite.Applications.

Another class, SearchHistories, is in \Applications\CrackHistory directory. The namespace of SearchHistories class is Company.WebSite.Applications.CrackHistory. SearchHistories inherits Framework.  Under .NET1.1, there was no problem with this. However, in VS2003, a compile error states "The type or namespace name 'Framework' could not be found (are you missing a using directive or an assembly reference?) C:\WEB\Applications\CrackHistory\SearchHistories.aspx.cs".

The immediate solution is to copy the Framework.cs file from the Applications directory and copy it into the Applications\CrackHistory directory. Then the error goes away. What is up with that?

WPF+ VS2010: Design mode error "The URI prefix is not recognized"?

our application uses VS2008 and WPF. To apply the styles in the design mode, we have used the "BlendMergedDictionary" class (see the following link) http://stackoverflow.com/questions/995101/how-do-i-get-wysiwyg-design-in-blend-vs-without-merged-resourcedictionary-in-ever It works very well in VS2008 IDE. Now we plan to move our application to VS2010. In VS2010 Design mode (click on ~.xaml design), we get error message:  "The URI prefix is not recognized."    at System.Net.WebRequest.Create(Uri requestUri, Boolean userUriBase)    at System.Net.WebRequest.Create(Uri requestUri)    at MS.Internal.WpfWebRequestHelper.CreateRequest(Uri uri)    at System.Windows.ResourceDictionary.set_Source(Uri value) the styles does not apply at the design time. It works fine in runtime. The following are the code: public class BlendMergedDictionary : ResourceDictionary { /// <summary> /// This class the purpose is allow we reference the "themes" and "styles" in resource dictionaries in separated assemblies /// by using StaticResource. The big problem using StaticResource is that it will complaints at design time can not find the resources /// So we use this class in xaml file, if it is design time, it will load the resource dictionaries in. /// If it is not in design time, it will use the reso

Problem: DataContract and DataMember attributes are not being recognized

I am having a strange problem. My service is otherwise working fine. However, now I want to add a custom object to be sent over to clients. I created a class to hold the data applied DataContract and DataMember attributes. However, compiler is not recognizing these attributes and giving me following error. The type or namespace name 'DataContractAttribute' could not be found (are you missing a using directive or an assembly reference?)  I could not figure our what assembly do I need to refer to. I am using VS2010 on WinXP. Thanks. kr

The DbpropMsmdSubqueries property was not recognized

My collegue gets this error message in Excel 2010 when he tries to connect to our cube: "The DbpropMsmdSubqueries property was not recognized". If I try to connect to the same cube with Excel 2010 beta I don't have any problems. What could be the problem?

MVC Application not recognized by web server

Hello,I uploaded my MVC2 application to my web hoster, but the web site does not run. When I request www.mysite.com, I just see the directory listing page of the root directory, and the web app does not execute. I don't see any error message, though. A normal Web Forms page works fine. Why is this?The web server is running ASP.NET 3.5 SP1. It does not have the MVC assembly installed in GAC, so I followed these instructions to upload the MVC assembly with my page: http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx , but to no avail.

String was not recognized as a valid DateTime.

Hai friends,            I have used following code                  newClient.Dob = DateTime.Parse (textBoxDOB.Text.Trim());I convert to string also..But  It Shows  error in Run Time Please verify it,                 Error :  String was not recognized as a valid DateTime.

truncate_only' is not a recognized BACKUP option

Hello All,I am able to run the below command in sql 2005 but in 2008 getting error : truncate_only' is not a recognized BACKUP option.Back Up Log [DBName] with Truncate_Only  dbcc shrinkfile([logFileName]) Thanks in AdvanceAshwin

IOException when exiting "Main" after USB device (recognized as device on COM port) is unplugged


Using VS 2005 /  .NET 2.0 SP2

An IOException of "The device does not recognize the command" is generated when my application exits after a USB device is unplugged. Using a USB device driver which presents the device as a COM port when it is connected. My application uses System.IO.Ports.SerialPort to communicate with the device. 

When the device is plugged into the USB port, it registers as connected to the COMx correctly. I start my application which enumerates through all of the COM ports looking for my device. The application correctly locates the device and starts communicating with it. This is all done using SerialPort methods (i.e. Open, ReadLine, ...)

If I disconnect the device from the USB port while my application is running, of course the virtual COMx port is now gone (device manager shows the COM port is gone) . My program senses that the device connected to the COM port is no longer responding (it has been polling it for information), it closes the COM port and displays a MessageBox to relate the condition and exits the application when the user presses OK.

Here is the odd part, the IOException occurs after leaving Main(). What am I missing in regards to this being a USB device (which is a seria

C# class not recognized


I have a C# solution with two projects in it. I have a C# class named RfKeeping.
RfKeeping resides in a subfolder named "Solution Items"

If I use my RfKeeping class in any of my projects C# code, it is not being
recognized by the compiler? I tried wrapping the C# class in a namespace, but that did not work

asp.net forms authentication with route handling - error, routes not recognized, returns to login


 I just created a small site with form authentication with route handling.  Without forms authentication, the pages route just fine.  With forms, it returns back to the login page as it is not one of my allowed locations specified in my web.config file.


I know I probably need to write a custom route handler.  Does anyone have an example I can follow for this?  Thanks.

Code behind file controls not defined/recognized when using WSPbuilder in Visual Studio 08


I am in the process of adding my custom aspx pages to the LAYOUTS folder(a folder I created) in a WSPbuilder solution in VS08. The problem I am having is when I build the solution it fails because the controls(Load, Textboxes, dropdown lists,etc) in the code behind file for the custom aspx pages say they are not defined. They all have a blue squiggly line and I get over 100 errors. Does anyone know what to do to get the WSP to recognize the code behind pages. Is there a setting or something I am missing.

String was not recognized as a valid DateTime.



"String was not recognized as a valid DateTime."

what can i do?

WSE 3.0 policycache not recognized in web.config


I am upgrading a .net web service from 1.1 to 2.0 that used wse 2.0

I am running into an issue where the reference to policy config file seems to be ignored and the web service works without inforcing its contents.



policy fileName="policyCache.config" />

it seems that the file is n

DataSet not recognized as buesiness object by ObjectDataSource


I have an ObjectDataSource in Visual Studio 2008.  I have a DataSet defined with a TableAdapter.  However, when I go to select the Table Adapter to use in the ObjectDataSource, nothing shows up.  I double checked that the DataSet is in fact in the App_Code folder.  I do not know what else to try.  The following code is the ASP code for that ObjectDataSource:




asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"

Can't get new assembly name recognized when deploying Solution



I've got a problem I've never had before.  I have a simple Solution/Feature with a web part, and after working on the web part, I decided to change the name of the assembly.  I have confirmed that all references to the assembly have been changed as well to the new name everywhere in the code/elements.xml, etc.  When I deploy/activate the Feature, the correct new name is added to the GAC and to Safe Controls in the web.config.  However, when I go to add the Web Part to a page, I get an error and in the Logs it is clearly attempting to reference the previous name of the assembly for the <type name='[namespace], [old assembly name], [version], [key token] /> element in the .webpart file.

I have confirmed that I can go to the Hive, find and open the .webpart in notepad and it is indeed using the new Assembly name, however in the logs it is attempting to locate the old one.

I have done a restart to try and clear everything, but it is still happening.  I've done a complete search through the solution for any instances of the old name (including the Project Properties, etc.), and the old name is no where.

So, what is going on?  Why can't I get the system to reference the new assembly name when adding the web part to a page?


classes are not getting recognized in VS2010 or VWD2010


I have this code"

Imports System
Imports System.Runtime.InteropServices.ComTypes
Imports Microsoft.Expression.Web.Interop.Designer
Namespace ExpressionWeb4_addin
    Public MustInherit Class DocumentEventHandler
        Inherits HTMLDocumentEvents
        Implements IDisposable

HTMLDocumentEvents is not recognized and its a member of the namespace Microsoft.Expression.Web.Interrop.Designer.HTMLDocumentEvents.  I can see the class in the object browser.  Even if I start typing Microsoft.Expression.Web.Interop.Designer., Intellisense never shows me the members of this namespace.  The fact I can see this namespace in the object browser seems to be indicative that I have it referenced correctly.

I'm stuck at this line because the entire tool does not seem to recognize this namespace.


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend