I have a Windows Mobile application in which I want to check the device orientation. Therefore I wrote the following property in one of my forms:
internal static Microsoft.WindowsCE.Forms.ScreenOrientation DeviceOriginalOrientation { get; private set; }
The strange thing is that after that whenever I open a UserControl, the designer shows this warning even if that UserControl doesn't use the property:
Could not load file or assembly 'Microsoft.WindowsCE.Forms, Version=3.5.0.0, Culture=neutral, PublicKeyToken=969db8053d3322ac' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Commenting the above property will dismiss the warning and shows the user control again. The application is built successfully and runs without any problems in both cases.
Does anybody know why this happens and how can I fix it?