samedi 9 mai 2015

C# using statement rejected in one class but accepted in another in same project

I have a WPF desktop project targeting .Net 4.5.1. Two identical using statements (verified by cut and paste):

using System.Windows.Data;

using System.Windows.Controls;

are accepted in one class but rejected in another. The type or namespace 'Data' does not exist in namespace 'System.Windows'

  • Both classes are in the same project.
  • Both classes are in the same namespace.
  • They are in different folders within the project structure.
  • I have project references to both PresentationCore and PresentationFramework.
  • The project is targeting Mixed Platforms/ Any CPU

Aucun commentaire:

Enregistrer un commentaire