Visual Studio 2010 Express rebuild problem

Ralf Habacker ralf.habacker at freenet.de
Sun Aug 28 09:57:54 UTC 2011


Hi,

while using the Microsoft Visual Studio 2010 Express Edition to debug 
KDE appliations I'm faced with the problem that all source from a 
project are rebuild all the time although no source has been changed.
This cost much useless compile time and is very annoying.

In my case (there may other other reasons for this) I found a workaround 
to fix this problem:

In C:\Program 
Files\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.targets

there is the following Target definition

<Target Name="ClCompile"
           Condition="'@(ClCompile)' != ''"
           DependsOnTargets="SelectClCompile">
<ItemGroup>
<ClCompile>
<PrecompiledHeaderOutputFile  
Condition="'%(ClCompile.PrecompiledHeader)' == 'NotUsing' or 
'%(ClCompile.PrecompiledHeader)' == ''"></PrecompiledHeaderOutputFile>
<PrecompiledHeaderOutputFile  
Condition="'%(ClCompile.PrecompiledHeader)' != 'NotUsing' and 
'$(RunCodeAnalysisOnce)'=='true' and '%(ClCompile.PrecompiledHeader)' != 
''">%(ClCompile.PrecompiledHeaderOutputFile).codeanalysis</PrecompiledHeaderOutputFile>
<PrecompiledHeaderFile        
Condition="'%(ClCompile.PrecompiledHeader)' == 'NotUsing' or 
'%(ClCompile.PrecompiledHeader)' == ''"></PrecompiledHeaderFile>
<AssemblerListingLocation     Condition="'%(ClCompile.AssemblerOutput)' 
== 'NoListing' or '%(ClCompile.AssemblerOutput)' == 
''"></AssemblerListingLocation>
<CompileAs                    Condition="'%(ClCompile.CompileAs)' == 
'Default' and '%(ClCompile.Extension)' == '.c'">CompileAsC</CompileAs>
<CompileAs                    Condition="'%(ClCompile.CompileAs)' == 
'Default' and '%(ClCompile.Extension)' != '.c'">CompileAsCpp</CompileAs>
<MinimalRebuildFromTracking   Condition="'$(BuildType)' != 'Build' or 
'$(ForceRebuild)' == 'true'">false</MinimalRebuildFromTracking>
</ClCompile>
</ItemGroup>

I changed the line

<MinimalRebuildFromTracking   Condition="'$(BuildType)' != 'Build' or 
'$(ForceRebuild)' == 'true'">false</MinimalRebuildFromTracking>

to
<MinimalRebuildFromTracking   Condition="'$(BuildType)' != 'Build' or 
'$(ForceRebuild)' == 'true'">true</MinimalRebuildFromTracking>

Ralf




More information about the Kde-windows mailing list