VS10 Generator does not properly generate C# projects targeting .NET Compact Framework
Compared to a natively generated VS solution, there are a couple of missing nodes that are required to support C# development targeting WEC2013/.NET Compact Framework 3.9.
To enable the correct project type GUI is VS, the {6AFDAB0D-95EF-424D-8A49-099ECD40B0FF};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} is required.
When setting the DOTNET_TARGET_FRAMEWORK_VERSION to "v3.9", this version of .NET will not be found on your build system unless you also have these nodes:
<TargetFrameworkIdentifier>WindowsEmbeddedCompact</TargetFrameworkIdentifier>
<TargetFrameworkTargetsVersion>v8.0</TargetFrameworkTargetsVersion>
in your .csproj file as siblings to the node:
<TargetFrameworkVersion>v3.9</TargetFrameworkVersion>
To support deploying to a WEC2013 target, you will also need to include MSBuild rules via this line:
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkTargetsVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
In the CMake code, there appears to be a need for the equivalent of:
Elem(e0, "Import").Attribute("Project", VS10_CSharp_TARGETS);
which generates the same Import line for .NET full framework projects. Note that the .NETCF Import line references the TargetFrameworkIdentifier and TargetFrameworkVersion values that need to be defined earlier in the project file.