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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

"Assembly '...' Was Not Found" When including a reference to a local namespace

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :WPF
I've got a WPF application with a window and a usercontrol:   Window:   <Window x:Class="UI.Windows.Main" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:UI.Windows.Documents" Title="Window1" Height="600" Width="800"> <DockPanel> <!-- Snip --> </DockPanel> </Window>     UserControl:   <UserControl x:Class="UI.Windows.Documents.MyDisplay" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml> <Grid> <!-- Snip --> </Grid> </UserControl>       Now, when I try to look at this in the designer i get an error saying Assembly 'UI' was not found.  I've searched high and low, but the internet is full of references to this being a 2005 issue and the solution is to upgrade to 2008.  I'm already using 2008 (don't even have 2005 installed on the machine), and I still get the problem.

View Complete Post

More Related Resource Links

Including a WebService in a Web Part - how to reference it?


Hi all,

I've created a Web Part using the SP 2010 template in VS 2010.  Also in this project, I added a web service (under WebServices/ProjectName) called TestService.asmx.  I would like to call this web service from JavaScript from my web part, but I can't figure out the correct parameters for the ScriptManager.  What I currently have in my Web Part User Control is:

<asp:ScriptManagerProxy runat="server">
        <asp:ServiceReference Path="/WebServices/VisualWebPartProject2/TestService.asmx" />

The path is not right - it returns a 404 error and the service definition does not get loaded into the page.  What is the right path?  The service gets deployed to "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebServices\VisualWebPartProject2".




Lists Service Reference namespace doesn't have CookieContainer


I downloaded /_vit_bin/Lists.asmx?wsdl and ran the "Add Service Reference" Dialog on it (The MOSS server is behind ISA Forms-Based Authentication). The name of the reference is "ListsService".

The following code doesn't build.

ListsService.CookieContainer = new CookieContainer();

It indicates that CookieContainer isn't in the namespace.

How do I pass a cookie to the service? Am I missing a "Using" statement?

FOR XML PATH and WITH XMLNAMESPACES - how do I NOT output a Namespace Reference for some PATHs?

I have an SQL Server 2005 query, that uses FOR XML PATH... to output the XML. Due to the complexity of the XML being output, I use correlated subqueries to output portions of the XML. Each subquery uses FOR XML PATH... to output composites within that 'chunk' of the XML. This works fine, i.e. the XML is output as I expect it to be/as I need it to be. We also need to use namespaces for some tags. The namespaces work as well - except that the references for the namespaces seem to be output within every composite defined within every FOR XML PATH... statement. I want the references only output within the 'top' or 'root' xml tag/composite, instead of every tag/composite defined within a PATH('...') option somewhere. Another way to say that is, I only want the Namespace references output for the PATH defined within the query itself, NOT for any PATHs defined within subqueries. An example from the query itself is: SELECT ( SELECT PhoneNumber AS '@communicationNumber', 'TELEPHONE' AS '@communicationChannelCode' FROM TableName tn3 WHERE tn3.ID = tn1.ID FOR XML PATH('communicationChannel'), TYPE ), ( SELECT FaxNumber AS '@communicationNumber', 'TELEFAX' AS '@communicationChannelCode' FROM TableName tn2 WHERE tn2.ID = tn1.ID FOR XML PATH('communicationChannel'), TYPE ), 'EN' AS 'personOrDepartme

A better way to reference your wizard steps using named steps

Note: this article uses the plain vanilla but the concepts apply equally well to its popular counterpart .

By far the most common way that I see wizard steps reference in code snippets is by their index.

Local variable scoping in C#

In my previous post, Compiler-generated scopes for local variable declarations, I briefly touched on the issue of multiple meanings applied to the same name. In this post, I'll aim to flush out the compiler's rules with regards to binding names in their local scopes.

Compiler-generated scopes for local variable declarations

I was tasked with understanding and fixing a bug on error reporting with foreach iteration variables the other day, and it got me thinking about local variable scoping rules in C# in general. First, the bug.

reference from menubuttons to text parts in article on the same page


Hi, I'm searching now for hours but couldn't find it.Cry

In my menu i have several buttons which (by a <a href..) should go the a part of an article that is in the same form.

Menu button : What is a database should go to the page default.aspx and in there is an article published.
A part of this article is having a piece of text about "what is a database"

Menu button: how to make a query should go to this same article in the same page but then to the part that is have the piece about the query. The next could be an example of what i'm doing:

    <li><a href="default.aspx ?????>what is a database</a></li>
    <li><a href="default.aspx ?????>what is a query</a></li>

Where my question marks are, there should be a connection to that particular piece of text.
In each article part there is an ID="text1" and the second part id="text2"

How shoudl i do that, Should i use a question mark.
Please give me some guidance how to structure the <li> statement or a pointer where I can read about it.


Type or namespace error.


A couple of days ago I started getting an unusual behavior when compiling Website projects. I have referenced class libraries added to my bin folder that are also correctely referenced in using statements in my aspx.cs code behind. When I compile, I get the 

Error 4 The type or namespace name 'CommonClassLibrary' could not be found (are you missing a using directive or an assembly reference?) C:\Dev\Fiscal_Portal\Implementation\FMS Portal Site_new\App_Code\BLL\DataTables.cs 1 7 C:\...\FMS Portal Site_new\

The type or namespace name 'CommonClassLibrary' could not be found (are you missing a using directive or an assembly reference?)

error message that would typically be received when the dll has not been added as a reference or added in a using statement.

I can eliminate the error by adding an


Reference HttpApplication from a separate HttpApplication


I want to create a website that can monitor the status of other websites running on the same server. Is this possible? How do I get a reference to a site's HttpApplication context from a separate HttpApplication?

Registering controls of current assembly object reference NOT set error


Hi There,

I have created a simple ASP.net Web Application (2.0) and have added a web user control.

Now in my page I have added this control but I have registered like this,

<%@ Register Assembly="WebApplication1" Namespace="WebApplication1" TagPrefix="Custom" %>

Which means I want to access all the controls in my current Web Application project

Then I have added my user control like this,

<Custom:MyUserControl ID="MyUserControl1" runat="server" PublicProperty="Hello" />

Every thing is fine but when I execute the project, NO control on my user control gets "instantiated" and thus I receive error "Object Reference Not Set"

Note that My Control has,

1) Public property PublicProperty as String

2) 1 Label control

In Load Event Handler I am setting Text property of Label Control to PublicProperty. Here object reference NOT set error occurs (which means Label control is NOT initialized).

I don't want to register my control using Src, TagPrefix etc. Any ideas?


How to authenticate local user usin ldap or non domain authentication



I created one application, and I need to authenticate local user. This user is the user who is login to his/her Personal Computer.. Main thing his that he/she does not in any DOMAIN... I want NON-DOMAIN authentication.. any how.... please help...

Changing from Local to WCF


I've been handed an application thats connection string implies a local host connection.

I want to make this connection a remote connection, to a database located on a Server.  I want the client and server to be able to communicate with one another remotely, instead of a local connection.

How does one create the Data Service, and establish end points to Server and Client?  Is it as simple as creating a contract (which I have limited knowledge on constructing), between the two locations, setting up the dataservice, security, and ratifying the 'connetions'?

A smidge of insight, please ;-)

Foundations: Workflow Services for Local Communication


This month's column describes how to use WCF for communication between a workflow and a host application in Windows Workflow Foundation 3. This knowledge should help developers with their efforts using WF3 and prepare them for WF4, where WCF is the only abstraction over queues (referred to as "bookmarks" in WF4) that ships with the framework.

Matthew Milner

MSDN Magazine November 2009

Basic Instincts: My Namespace Extensions with My Extensibility


In this month's column, learn how to integrate your own My Namespace extension into the Visual Basic development environment using the My Extensibility feature.

Matthew DeVore

MSDN Magazine April 2008

Visual Basic: Navigate The .NET Framework And Your Projects With The My Namespace


The My Namespace is best described as a speed-dial for the .NET Framework. It provides an intuitive navigation hierarchy that exposes existing .NET functionality through easily understood root objects. Here Duncan Mackenzie explains it all.

Duncan Mackenzie

MSDN Magazine Visual Studio 2005 Guided Tour 2006

Visual Basic: Simplify Common Tasks by Customizing the My Namespace


Underlying the My namespace's APIs is a fully extensible architecture you can leverage to customize the behavior of My and to add new services to its hierarchy to adapt to specific application needs. the My namespace is optimized to provide simple solutions to common problems. But if your requirements are different, you can use the My namespace's customization model to modify the behavior of individual My namespace members to meet specific application requirements.

Joe Binder

MSDN Magazine July 2005

Windows Shell: Create Namespace Extensions for Windows Explorer with the .NET Framework


Extending the Windows shell with namespace extensions allows you to create some custom functionality for Windows Explorer. One common use is to enable Explorer to present a list of items that do not exist in one real folder, but actually reside in a number of places. The view on the folder makes it look like these items are in one place, so managing them becomes easier. This article illustrates the process of creating custom shell namespace extensions using C# and the .NET Framework. The author dispels some myths about the difficulty of writing such extensions, and shows that it is easier than it was before .NET. Along the way he outlines undocumented interfaces and describes advanced techniques for consuming them in .NET.

Dave Rensin

MSDN Magazine January 2004

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