CF typically contains a subset of classes from a regular structure, but you cannot directly execute code from one to another. In addition, instead of just being a subset, there may be a few things in a compact design that are not part of the regular version, such as mobile device-specific GUIs (soft keys, etc.) - provided what do you write exform winform, not a web page (this may be the easiest way to get compatibility).
With some effort, you can exchange logical code, in particular with dll utilities, but they need different csproj files (since they have completely different compilation goals). To reduce maintenance, you can often cheat by hacking csproj to use wildcards, for example here :
<ItemGroup> <Compile Include="..\protobuf-net\**\*.cs" /> </ItemGroup>
For the user interface, things get a lot more complicated. In general, it would be expected to have a common business logic and a separate user interface for different target devices.
Marc gravell
source share