Thursday, September 11, 2008

System.ComponentModel.INotifyPropertyChanged not compiling on .Net Compact Framework

Wondering why you are getting a compile error when trying to use a class on .Net Compact Framework in a referenced dll? I'm a little rough on making mobile stuff, but I was sure that sharing between the normal and compact frameworks should work...

The answer is in the form of a quote from this link:


the assembly must be compiled against the .NETCF class libraries. Desktop knows how to promote .NETCF libraries to the appropriate desktop counterpart. Trying to load a desktop compiled assembly on .NETCF will fail.

So, there you have it. Any assemblies used for sharing, must be compiled in .Net Compact Framework only. I just ended up making copies of the files to preserve our current solution structure.

1 comments:

Diego Correa

I had the same problem I want to compile a smartdevice application using System.ComponentModel and the results show me an error "System.ComponentModel.IDataErrorInfo...."

I need use this namespace because the DataObjects.net 4.2 persistence framework needs it, but the creators of this framework said me that nowadays there is not support for mobile devices, probably in the future.