0
votes

I added refernence of System.Windows.dll to my project cos i need it some pages but lots of error pop outs like

The type 'System.Windows.MessageBox' exists in both 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\Profile\Client\PresentationFramework.dll' and 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Windows.dll'

and

The type 'System.Windows.RoutedEventArgs' exists in both 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\Profile\Client\PresentationCore.dll' and 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Windows.dll'

and many more errors that says exist is both assemblies . How do i fix this?

2
so your using Siverlight and WPF in the same application?sa_ddam213
yup i hav a WPF application , but i am moving a source code that is silverlight to WPFuser2376998

2 Answers

0
votes

What about full qualifying the types you are using in your class and / or defining alias names for your using directives. Does this work ?

0
votes

Maybe try explicitly naming the namespace that you want to use.

Something like:

[System.Windows.MessageBox]
private void SomeMethod()
{
    MessageBox.Show("SomeText");
}

or

System.Windows.MessageBox.Show("SomeText");