win7 64位wince6.0生成SDK出错

来源:互联网 发布:淘宝站外活动怎么报 编辑:程序博客网 时间:2024/05/22 14:27

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);
}



5.在编译之前需要设置属性


6.在项目目录下找到GenSdk32.exe放到IdeVS目录下

7.在需要生成SDK的项目中,使用命令行CMD工具输入如下指令:
"C:\Program Files (x86)\Microsoft Platform Builder\6.00\cepb\IdeVS\GenSdk32.exe" "C:\WINCE600\OSDesigns\S4WE\S4WE\SDKs\SDK1\obj\BuildSDK1.xml"(此行根据具体项目目录而定)
既可以编译完成SDK

更加详细的请参照如下:

Installing Windows CE 6.0 tools on a Windows7 64bit PC 

http://geekswithblogs.net/WindowsEmbeddedCookbook/archive/2010/08/31/installing-windows-ce-6.0-tools-on-a-windows7-64bit-pc.aspx

0 0
原创粉丝点击