Unknown build error Cannot resolve dependency to System.Windows Unknown build error Cannot resolve dependency to System.Windows wpf wpf

Unknown build error Cannot resolve dependency to System.Windows


I have received this error message for another (non-GAC, custom) assembly.

In my case, the situation was as follows:

  • assembly X contains class A
  • assembly Y contains class B, which inherits from A
  • assembly Z contains a data template for class B

Y referenced X, Z referenced Y.

The error message was pointing to the line in the data template in Z where B was referenced, and pointed out that X could not be loaded.

The solution was to have Z also reference X. Apparently, the compiler cannot resolve that transitive reference for loading the required assemblies on its own.


That error generally means that you've added a reference to a Silverlight assembly within a WPF project - the two can't coexist.

See: Errors when referencing Silverlight class library from WPF application


In your [projectName].csproj file, you can identify the non-resolvable dependency and remove it before add it again latter.

  • This was my error: v4.0.30319\Microsoft.WinFx.targets(268,9): error MC1000: Unknown build error, 'Cannot resolve dependency to assembly 'Microsoft.Data.Schema',...
  • in my .csproj file i identified the reference line with the key word 'Microsoft.Data.Schema'
  • i deleted the line and my project was able to be build again.

Hope it will help others