采用C#、.NET Compact Framework开发WinCE、Windows Mobile程序时,编译项目非常慢,有时候需要几分钟甚至十几分钟你可以修改VS的配置文件,以屏蔽掉编译中不需要的任务,这个修改可以让你的编译速度大大提高,有可能你的编译时间只需要几秒钟就搞定了啊。
- 在 '我的电脑' 中找到以下文件,用记事本打开
C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.CompactFramework.Common.targets
找到这一段:Name="PlatformVerificationTask"> PlatformFamilyName="$(PlatformFamilyName)" PlatformID="$(PlatformID)" SourceAssembly="@(IntermediateAssembly)" ReferencePath="@(ReferencePath)" TreatWarningsAsErrors="$(TreatWarningsAsErrors)" PlatformVersion="$(TargetFrameworkVersion)"/>
在
"PlatformVerificationTask"
后面添加
Condition="'$(SkipPlatformVerification)' == 'true'"
最终节点如下Name="PlatformVerificationTask"> Condition="'$(SkipPlatformVerification)' == 'true'"> PlatformFamilyName="$(PlatformFamilyName)" PlatformID="$(PlatformID)" SourceAssembly="@(IntermediateAssembly)" ReferencePath="@(ReferencePath)" TreatWarningsAsErrors="$(TreatWarningsAsErrors)" PlatformVersion="$(TargetFrameworkVersion)"/>
重启VS,再次编译,编译部署的速度会大大提高