win7 64位系统 wince6.0环境
生成SDK的时候会出现如下错误:
'C:\Program' Files (x86)\Microsoft Visual Studio 8\Common7\IDE>"C:\Program Files (x86)\Microsoft Platform Builder\6.00\cepb\IdeVS\GenSdk.exe" "C:\WINCE600\OSDesigns\S4WE\S4WE\SDKs\SDK1\obj\BuildSDK1.xml"
Required files may be missing. To resolve the issue, reinstall Platform Builder.
解析:
This happens because GENSDK.EXE (the tool that “packs” all the files required for your SDK in a MSI file that you can redistribute and install on developer’s machines) is a .NET application that is spawned from PB and runs in 64bit mode. 64bit mode has its own registry and the configuration keys generated by PB setup are only in the 32bit registry. That generates the problem.
To fix it we can just develop a small .NET application, force it to run as 32bit (x86) and reference GENSDK.EXE as an external assembly, invoking its main method from our new 32bit app. This will force GenSdk to run as a 32bit app, finding all the registry information it needs to complete the SDK build.
解决方法如下:
1.新建C# 控制台应用程序
2.在新建立的项目右键:添加引用-》浏览选项 找到GenSdk.exe打开
3.双击GenSdk,通过对象浏览器找到GenSdk32中的Program
4.双击program并在主函数中添加
Microsoft.PlatformBuilder.Sdk.SdkGenerator.GenSdk.Main(args);
static void Main(string[] args)
{
Microsoft.PlatformBuilder.Sdk.SdkGenerator.GenSdk.Main(args);
}