You should have ControlsExDeviceDummy as the desktop component and ControlsExDevice for the device. If you have not had the dummy or the "real" library as a component on the desktop this may be why the compiler fails as it picks up information from the desktop library even when compiling for the device.
Can you compile the ControlsExDeviceDemo app that comes with the library?
P.S. If you are wondering why I've jumped into this thread it's because I wrote those libraries and they compile fine on my machine - and other peoples - so I don't think there is anything intrinsically wrong with the library code.
that program does not compile either - same error. There must be something wrong with the setup on my machine. Likely in the .net stuff somewhere.
Any idea where I could start to look?
Thanks for jumping in, by the way, all help appreciated.
@Erel. Does he need to have installed CF 2.0 on the device to get his desktop updated with the CF assemblies used by the C# compiler? The CF 2.0 redistributable is so huge that I assumed it had bits for the desktop SDK included as well - but I don't really know!
Well, I've uninstalled Basic4ppc and all references to .Net Frameworks.
I've now re-installed .Net Framework 1 and 2 and .Net Compact Framework 2 and Basic4ppc. Still the same error message.
Well, I can't get to bothered at the moment. If I leave the Dummy file in the device side the program compile and builds with a DTP which is what I want at the moment. That is, it runs on a real device.
Will I be heading for trouble later this way though?
Time (and whether other libraries work) will tell!
@Erel - in case it it a clue! Both dummy and device libraries are compiled in VS2005 for WM2003 and CF 2.0. The difference, aprart from coding, is that the device version additionally references Microsoft.WindowsCE.Forms to use the device Notifier. Presumably it is this reference that causes the problem, but why I have no idea.
The simplest solution is to add SIP(True) or SIP(false) somewhere in your code.
The reason for this is a bit complex.
If you'll delete the source code ControlsExDevice.cs from Basic4ppc libraries folder it will also work.
However when the compiler sees this file (and you have a reference to ControlsExDevice.dll) the compiler tries to merge it in the executable. Merging is done by compiling the code together with your code.
To compile this library a reference to Microsoft.WindowsCE.Forms.dll is required.
Basic4ppc doesn't add a reference to this library by default.
Basic4ppc only adds a reference to this dll if it knows that this dll is needed.
The SIP method requires a reference and therefore adding it will solve this problem.
Another solution is to edit the LibrariesException.txt file (found under Basic4ppc folder).
Basic4ppc v6.50 will be distributed with a modified LibrariesException file that will fix this problem.