I have given an alias name to a dll which I am referencing from Visual studio by going to the property of that dll and specifing the alias and using the same in my code file.
extern alias toolkitalias;
using toolkitalias::System.Windows;
using toolkitalias::System.Windows.Controls;
But still it gives error saying The extern alias ‘toolkitalias’ was not specified in a /reference option”
Am I missing something. Please help
I have done some research and what I found is giving alias to a dll from Visual studio doesnt work as expected and is reported as a bug.
http://connect.microsoft.com/VisualStudio/feedback/details/615953/reference-aliases-are-ignored-on-projects-containing-some-xaml-files.
Also the above solution only works in case code behind files and not in case of xaml. For xaml, what Marc suggested is correct with alias name given from visual studio property window as global,toolkitalias.
Hope it helps.