Friday, October 16, 2009

Improve .NETCF Build Performance in Visual Studio

A lot of .NETCF developers are surprisingly not aware of the Platform Verification Task in Visual Studio. Disabling this in the build process will speed up the build of .NETCF projects. To make things quick and short, here's what you need to do:

1) Open the file C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.CompactFramework.Common.targets for editing.

2) Change the following:

   99   <Target
  100     Name="PlatformVerificationTask">
  101     <PlatformVerificationTask
  102       PlatformFamilyName="$(PlatformFamilyName)"
  103       PlatformID="$(PlatformID)"
  104       SourceAssembly="@(IntermediateAssembly)"
  105       ReferencePath="@(ReferencePath)"
  106       TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
  107       PlatformVersion="$(TargetFrameworkVersion)"/>
  108   </Target>


to:

   99   <Target
  100     Name="PlatformVerificationTask">
  101     <PlatformVerificationTask
  102       Condition="'$(DoPlatformVerificationTask)'=='true'"
  103       PlatformFamilyName="$(PlatformFamilyName)"
  104       PlatformID="$(PlatformID)"
  105       SourceAssembly="@(IntermediateAssembly)"
  106       ReferencePath="@(ReferencePath)"
  107       TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
  108       PlatformVersion="$(TargetFrameworkVersion)"/>
  109   </Target>


The following configuration above was an excert from an article called Platform Verification Task leading to slow builds on compact framework projects

1 comment:

UK said...

It should be

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

Isn't it?