zoukankan      html  css  js  c++  java
  • WinCE程序编译慢的解决办法

       最近在做数控折弯机项目时,VS2008环境下采用C#、.NET Compact Framework开发WinCE、Windows Mobile程序时,编译项目非常慢,看着进度条慢慢刷,有时候需要几分钟。效率太低了,折磨了我几周的时间,忍无可忍,终于在网上找到解决方案。(这里得到一个启发:不管什么时候,遇到不爽不懂的,第一时间找解决方案,互联网是最近的资源

    通过修改VS的配置文件,以屏蔽掉编译中不需要的任务,这个修改让编译速度大大提高。

    1、找到以下文件

    C:WindowsMicrosoft.NETFrameworkv3.5Microsoft.CompactFramework.Common.targets

    2、用记事本打开该文件,找到以下节点

        <Target 
           
    Name="PlatformVerificationTask"> 
            <PlatformVerificationTask 
                PlatformFamilyName="$(PlatformFamilyName)" 
                PlatformID="$(PlatformID)" 
                SourceAssembly="@(IntermediateAssembly)" 
                ReferencePath="@(ReferencePath)" 
                TreatWarningsAsErrors="$(TreatWarningsAsErrors)" 
                PlatformVersion="$(TargetFrameworkVersion)"/> 
        </Target>

    在 PlatformVerificationTask后面添加

     Condition="'$(SkipPlatformVerification)' == 'true'"  

    最终节点如下

    <Target 
         
      Name="PlatformVerificationTask" Condition="'$(SkipPlatformVerification)' == 'true'" > 
            <PlatformVerificationTask 
                PlatformFamilyName="$(PlatformFamilyName)" 
                PlatformID="$(PlatformID)" 
                SourceAssembly="@(IntermediateAssembly)" 
                ReferencePath="@(ReferencePath)" 
                TreatWarningsAsErrors="$(TreatWarningsAsErrors)" 
                PlatformVersion="$(TargetFrameworkVersion)"/> 
        </Target> 

    也可以将这段设置直接复制,替换。

    3、重启VS,再次编译,编译部署的速度会大大提高。

     

  • 相关阅读:
    GridView动态删除Item
    GridView动态添加View
    Unity debug mode下的watermark去除
    Espresso unit test的输入法问题
    [troubleShooting]如何安装Andorid M preview到NEXUS系列机器
    [trouble-shooting]android 无法启动X86模式虚拟机的问题解决。
    Android studio+ndk 下面的gradle配置记录
    html call android apk的方法汇总
    Android studio 运行和编译的优化
    Android Installation error: INSTALL_FAILED_UID_CHANGED的解决办法
  • 原文地址:https://www.cnblogs.com/peterYong/p/6556685.html
Copyright © 2011-2022 走看看