Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CS1684 Reference to Type System.Windows.Input.ICommand claims it is defined in 'xxx' but could not be found

I'm attempting to start using VS 2012 instead of VS 2010, but after installing VS 2012 and .Net 4.5. I'm getting code analysis errors in VS 2010 saying The following error was encountered while reading module 'xxx_Accessor': Could not resolve type reference: [System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089] System.Windows.Input.ICommand.

I'm guessing this is related to the fact that .Net 4.5 has moved the location of the ICommand interface, but is there a solution to this so that code analysis will run again? I've tried adding the ignorestrongassemblynames to the project file of the test project and the project under test, but that hasn't worked.

like image 616
Bryce Klinker Avatar asked Nov 04 '22 17:11

Bryce Klinker


1 Answers

I've had just the same problem, but not with all of the assemblies that reference ICommands, just some.

I removed the reference to PresentationCore, rebuilt and re-added it. The problem went away.

like image 50
CurlyPaul Avatar answered Nov 11 '22 03:11

CurlyPaul