Search

Friday, January 22, 2010

how to speed up visual studio build and compile time ?

Want to reduce build, compile and deployment time in visual studio 2008 or vs2005 windows mobile development? one thing that frustrates .netcf developers is building/ compiling application takes hell lot of a time this is due to platform verification but fortunately there is a hack which can speedup build and compile time several times faster just follow below steps if you are also facing the same issue

--> first of all close your visual studio

--> go to this path C:\WINDOWS\Microsoft.NET\Framework\v3.5\

--> Find Microsoft.CompactFramework.Common.targets file and make sure to back up it

-->Now open Microsoft.CompactFramework.Common.targets file in text editor and look for below statements


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

Now modify the Name="PlatformVerificationtask" line by adding this code"Condition="'$(SkipPlatformVerification)' == 'true'"" as below


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


Now open your project and compile it i am damn sure it works 5x faster

11 comments:

Jazz said...

it works!
thanks for the post

ImTheNightmare said...

thank you man it work very well!! before the project took 1 minute or more to compile!! now compile in 5 seconds!!! :D

Anonymous said...

Exceptional! Build time is pretty much non-existant now :)

Anonymous said...

It works!!!!
FANTASTIC!!!!!
Thank you very much!!!

Anonymous said...

It's work!!
Thanks

Anonymous said...

Wow...wished I had searched this earlier. At first I was thinking that it was normal for large projects but when it became unbearable i searched. Boy, what have I lost....hours of valuable development time waiting for the project to build. Try for yourself....amazing speed.


Thanks

jotge said...

Does this speed up .NetFramework 4 also? There is no such statement in this file (64 bit)...

Kleidi said...

Works!

By the way, how did you find this tweak.

Unknown said...

I keep referring to this page whenever I have to set up a new Visual Studio 2008 instance for Windows Mobile development. The post says it makes the build run 5x faster. On a newer machine with a fast SSD, I think it is closer to 100x faster!

Thanks for the post!

Anonymous said...

YES! Thank you so much! It literally reduced ~3 minute compiliations down to about 10 seconds!

Atul Kirpalani said...

Thanks heaps......
Life saver....
YOU ROCK

Post a Comment

Other Interesting Articles



Related Article Widget by Yogith

Search Powered by Google