Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Assembly not found
Message
From
24/12/2009 08:29:44
 
 
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01439842
Message ID:
01440516
Views:
26
>>>Don't forget that intellisense is listing in namespace order. Double check that the namespaces used in the assembly are what you thought/are looking for (I've made that mistake before.....)
>>>>
>>
>>I checked my Members.Library project properties and it had the Assembly Name and default namespace set to Members. I've changed both to Members.Library, but it hasn't made a difference. All my code in my class library all had Members.Library as the namespace.
>>
>>>>>To narrow things down a bit I'd try temporarily adding a new project and trying to reference the Members.Library assembly from there (initially without actually making use of the assembly elswhere in XAML)
>>>>>
>>
>>I added a new Winforms project and put using Members.Library in the Program.cs and it didn't complain (it also showed me the intellisense for Library after I had typed in Members.)
>>
>>I then added a new WPF Application and in the default Window1.xaml tried to add the xmlns:Members= and Members.Library was not in the intellisense list.
>>
>>This is the code:
>>
>>
<Window x:Class="TestWpf.Window1"
>>    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>>    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>>        xmlns:Members="Mem"
>>    Title="Window1" Height="300" Width="300">
>>    <Grid>
>>        
>>    </Grid>
>></Window>
>>
>
>Hmmm. Works for me. Given this file in a project named Members:
namespace Members.Library
>{
>    public class Class1
>    {
>    }
>}
>then the following WPF XAML shows the Library.Members namespace in Intellisense and ends up like this:
<Window x:Class="WpfApplication1.Window1"
>    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>    xmlns:Members="clr-namespace:Members.Library;assembly=Members" >
></Window>
But I have come across occasions where it was neccessary to remove and re-add the Members project to the WPF apllication references before Intellisense picked it up (but I think this has already beem suggested).
>
Yes, I've removed and added it back on a number of occasions.

>What happens if you try adding a 'using Members.' in the windows code-behind - does Intellisense kick in there with the 'Library' part?
>

Yes, intellisense kicks in there showing the Library part.

>And just to be clear : Can you confirm that you are adding the reference to the Members assembly as a reference to the project in the same solution rather than a reference to the DLL?

I have actually tried both (that's how I realised the DLL was actually called Members, not Members.Library), but right now it is referenced as a Project within the solution.

I really appreciate all the time your spending on this.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Reply
Map
View

Click here to load this message in the networking platform