I have a wpf Application in which I am trying to reference a class library i have created. I have added a reference to the .dll And i have added the using statement to my fi
If you're getting this without a DLL - just a code file check it's set to compile. In Visual Studio 2013 I keep adding code files and it sets the Build Action (found under Advanced section of Properties of the code file to "Content" rather than "Compile". Change this.
You can Copy any .dll files from other project, two .dll files. eg: A.dll,A.pdb and Rename this two files to your project's name.
Then you can rebuild this project.
A few thoughts on this matter that you can try:
Check that a lower version is not calling a higher version assembly (e.g. .NET 3.5 project is not calling a .NET 4.0 assembly).
Clean -> Build (or Rebuild)
Manually delete bin/obj folders of both caller and calling projects. This forces everything to be built - the 'hard ' way. This may sound redundant, but has worked for me a couple of times.
Restart VS - sometimes, there is just no explanation.
Reboot - when nothing else works, give it a break and try again.
Sometimes an explicit naming of the assembly which contains the namespace is required.
xmlns:myns="clr-namespace:MyNamespace;assembly=MyAssembly"
I don't know why it is sometimes required.
The most common cause of this is that your .DLL targets the full .NET Framework, but the WPF Application targets the Client Profile.
For example, if your library targets .NET 3.5, make sure your WPF Application targets the full .NET 3.5 or 4.0 framework, not the client profile.