giovedì 28 gennaio 2016

Sviluppo embedded - Velocizzare il tempo di compilazione evitando il Platform Verification Task

Se la compilazione dei tuoi progetti embedded/windows mobile C# impiegano molto tempo con Visual Studio 2008, puoi provare a disabilitare il Platform Verification Task.
Platform Verification Task (PVT) is a post-build validation step to catch the unsupported PMEs before they can result in a runtime exception.
Per disabilitarlo apri il file C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.CompactFramework.Common.targets

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

e aggiungi la linea in grassetto:

<Target
        Name="PlatformVerificationTask">
        <PlatformVerificationTask
   Condition="'$(DoPlatformVerificationTask)'=='true'"
           PlatformFamilyName="$(PlatformFamilyName)"
           PlatformID="$(PlatformID)"
           SourceAssembly="@(IntermediateAssembly)"
           ReferencePath="@(ReferencePath)"
           TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
           PlatformVersion="$(TargetFrameworkVersion)"/>
</Target>
Infine rilancia Visual Studio 2008 e ricompila il tuo progetto, il problema dovrebbe essere risolto.

Nessun commento:

Posta un commento