Windows Mobile项目编译很慢情况的解决(VS2008)

来源:互联网 时间:1970-01-01

一开始以为是老爷机跑得慢,换了台双核的新电脑,编译MOBILE项目的过程还是长达90-200S;

上网寻求解决的办法,发现了问题并用下面的办法解决:

引自:http://blogs.msdn.com/vsdteam/archive/2006/09/15/756400.aspx

Disabling PlatformVerificationTask: If it is so useful, why will I disable it at all?

Though Platform Verification Task aids the developer in identifying all the unsupported PMEs getting accessed in code at build time itself, it does add quite a bit to the build time. Ideally the developer might like to run PVT only once in a while and not during every build. Currently there is no support in the VS2005 IDE to customize the execution of PVT during build, though we are looking to add support for it in next release. As a workaround for VS2005, PVT execution can be customized by following the steps below:

1) Open the file %windir%/Microsoft.NET/Framework/v2.0.50727/Microsoft.CompactFramework.Common.Targets for editing.

2) Go to the line which reads:

Name="PlatformVerificationTask">

and change it to:

Name="PlatformVerificationTask" Condition="'$(SkipPlatformVerification)' == 'true'">

3) Add the SkipPlatformVerification environment variable to the system and set it to "true" (To re-enable Platform Verification set the environment variable to "false")

4) Restart Visual Studio for the changes to take effect (If building from the command line using MSBuild, add /p:SkipPlatformVerification=true to your command line to turn off the task. You can specify the variable in the project file also, so that this information is persisted across sessions).

解决办法:

1.VS平台上,选工具-选项-项目和解决方案-MS BUILD 项目生成输出详细信息中选择“诊断”,目的是在调试窗口中看出那个过程编译的时间最久。MOBILE平台一般问题都是出在PlatformVerificationTask上

2.进入.NET环境的安装位置:C:/WINDOWS/Microsoft.NET/Framework/v3.5 ,修改Microsoft.CompactFramework.Common.targets中关于PlatformVerificationTask的部分

3.参考上面的英文说明进行修改,

Name="PlatformVerificationTask">

修改成

Name="PlatformVerificationTask" Condition="'$(SkipPlatformVerification)' == 'true'">

4.重启VS2008,进行编译看速度是否正常,若不正常,上面的TRUE值再改为FALSE,再重新启动VS2008,问题一般可解决。

本文来自lipan112000的博客,原文地址:http://hi.baidu.com/lipan112000/blog/item/08174d3febdf00df9f3d622d.html

相关阅读:
Top