title: How can I toggle my VS 2008 solution's target platform between Windows CE and Winforms?
body: <p>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</p>
  
  <p>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 <em>is</em> a Windows CE / CF project.</p>
  
  <p>It does, because Project Properties has a Devices tab, and when I F5, an emulator (kind of a generic one) is invoked.</p>
  
  <p>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?</p>
  
  <p>Selecting Project > Change Target Platform does show "Windows CE" as the current value, but 
  the "Change to:" dropdown only contains:</p>
  
  <pre><code>Pocket PC 2003
  Windows Mobile 5.0 Pocket PC SDK
  Windows Mobile 5.0 Smartphone SDK
  Windows Mobile 6 Professional SDK
  </code></pre>
  
  <p>The project properties Devies tab has many more options in the "Target device:" dropdown, 
  but seemingly nothing of value for me.</p>
  
  <p>If I unload the project and select "Edit bla.csproj, I see the following entries in that .csproj file:</p>
  
  <pre><code>&lt;NativePlatformName&gt;Windows CE&lt;/NativePlatformName&gt;
  . . .
  &lt;PlatformFamilyName&gt;WindowsCE&lt;/PlatformFamilyName&gt;
  . . .
  &lt;Reference Include="Microsoft.WindowsCE.Forms"&gt;
    &lt;Name&gt;Microsoft.WindowsCE.Forms&lt;/Name&gt;
  &lt;/Reference&gt;
  . . .
  &lt;Import Condition="'$(TargetFrameworkVersion)' == 'v3.5'" 
  Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" /&gt;
  </code></pre>
  
  <p>...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?</p>
  
  <h2>UPDATE</h2>
  
  <p>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:</p>
  
  <p><em>Invalid Resx file. ResX input is not valid. Cannot find valid "resheader" tags for the ResX reader and writer type names.</em></p>
  
  <p>What does that mean? The solution here <a href="https://stackoverflow.com/questions/8390447/c-sharp-resx-file-error">C# resx file error</a>:  doesn't seem to apply to my situation, as the out-of-kilter / off-the-rails files already have this format:  </p>
  
  <pre><code>&lt;resheader name="resmimetype"&gt;
    &lt;value&gt;text/microsoft-resx&lt;/value&gt;
  &lt;/resheader&gt;
  </code></pre>