user2376998
user2376998

Reputation: 1071

Conflict in reference assemblies

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?

Upvotes: 0

Views: 452

Answers (2)

madbrendon
madbrendon

Reputation: 650

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");

Upvotes: 0

Tintenfiisch
Tintenfiisch

Reputation: 360

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

Upvotes: 0

Related Questions