I'm in the process of porting a legacy Windows CE / Compact Framework project from VS 2003 in XP Mode with .NET 1.1 to VS 2008 and .NET 3.5
As debugging is such a pain trying to target a handheld device (there is no emulator for the specific device I'm targeting, a Motorola 3190), I want to toggle my project between targeting Windows CE and Winforms (I will debug it as a Winforms app normally, periodically setting it to Windows CE so as to build and download to the device). How can I do that? I don't see now how Visual Studio knows the project is a Windows CE / CF project.
It does, because Project Properties has a Devices tab, and when I F5, an emulator (kind of a generic one) is invoked.
But on the project properties Application tab, the Target Framework dropdown is blank and grayed out. Output type is Windows application. I would think Target Framework would be set to Windows CE or some such. Obviously it is set somewhere, but where? How can I toggle between it being run as a CE / CF and as a "plain old" Winforms project?
Selecting Project > Change Target Platform does show "Windows CE" as the current value, but the "Change to:" dropdown only contains:
Pocket PC 2003
Windows Mobile 5.0 Pocket PC SDK
Windows Mobile 5.0 Smartphone SDK
Windows Mobile 6 Professional SDK
The project properties Devies tab has many more options in the "Target device:" dropdown, but seemingly nothing of value for me.
If I unload the project and select "Edit bla.csproj, I see the following entries in that .csproj file:
<NativePlatformName>Windows CE</NativePlatformName>
. . .
<PlatformFamilyName>WindowsCE</PlatformFamilyName>
. . .
<Reference Include="Microsoft.WindowsCE.Forms">
<Name>Microsoft.WindowsCE.Forms</Name>
</Reference>
. . .
<Import Condition="'$(TargetFrameworkVersion)' == 'v3.5'"
Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
...and possibly at least one of these is of import here (no pun intended), but if so, what should I change it to, and if I should change it, should I change it directly, or indirectly? If the latter, how?
UPDATE
Trying to add all the *.cs and *.resx files to a Winforms project, and attacking the duality that way, I get the following error on some, but not all of my *.resx files:
Invalid Resx file. ResX input is not valid. Cannot find valid "resheader" tags for the ResX reader and writer type names.
What does that mean? The solution here C# resx file error: doesn't seem to apply to my situation, as the out-of-kilter / off-the-rails files already have this format:
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>