Reference not working?

Reference not working?

Old forum URL: forums.lhotka.net/forums/t/8191.aspx


FCazabon posted on Monday, December 21, 2009

I know this is not the right place to ask this question (could someone suggest an active forum with knowledgeable and helpful people on it?) but I am not getting any answers on the other fora where I have posted this question.

Hopefully someone here may have come across this before:

I have a solution with a few projects in it. One is Members.Library which has some Business Objects and the other is the UI in WPF.

In the UI project I am trying to define a window to edit a lookup table (MembershipTypes), but I was getting this error:

Assembly 'Members.Library' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built.

This is on this line in my WPF:

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:MembersWpf"
xmlns:csla="clr-namespace:Csla.Wpf;assembly=Csla"
xmlns:members="clr-namespace:Members.Library;assembly=Members.Library">



I have ensured Members.Library has been built successfully (it also referenced elsewhere successfully) and have ensured it is listed in this projects References (I have even removed it and added it again).

I removed the line and typed it in again, Members.Library is not available in the intellisense, but the error has now gone and I have another one which I believe is related:

The next line of code is:

(I've used pre tags here, but some of the code is not displaying!)





ObjectType="{x:Type members:MembershipTypes}"
FactoryMethod="GetMembershipTypes"
IsAsynchronous="False"
DataChanged="DataChanged"
ManageObjectLifetime="True">




And I am getting this error:

The type reference cannot find a public type named 'MembershipTypes'.

MembershipTypes is defined in Members.Library. Any ideas what I am doing wrong?

ajj3085 replied on Tuesday, December 22, 2009

Is there a type Members.Library.MembershipTypes?  As in, is that your actual namespace?

FCazabon replied on Wednesday, December 23, 2009

Yes, I have MembershipTypes.cs which has this code in it:

namespace Members.Library
{
public class MembershipTypes : BusinessListBase

FCazabon replied on Thursday, December 24, 2009

By adding in the Security stuff into Members.Library and adding another form in my MembersWpf project the error has magically disappeared! I'm not quite sure what has happened, but if/when I understand it I'll post back here.

ajj3085 replied on Tuesday, December 29, 2009

What Security "stuff" are you refering to?  Perhaps your Members.Library wasn't compiling, and so the Wpf project was using an old version of your assembly?

FCazabon replied on Monday, January 04, 2010

Sorry for the delay. Was avoiding the computer for a while :)

I added in the Identity and Principal code into Members.Library. If it wasn't compiling it wasn't giving any errors either, but your theory is as good as any.

I'm going to get back into it and hopefully things will go smoother from here on.

Thanks for your help again

Copyright (c) Marimer LLC