新木场到迪斯尼怎么去:Windows Mobile项目编译很慢情况的解决(VS2008)

来源:百度文库 编辑:偶看新闻 时间:2024/04/29 00:35:12

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,问题一般可解决。