Created
March 17, 2012 00:33
-
-
Save CitizenInsane/2053877 to your computer and use it in GitHub Desktop.
Trying to figure out why incremental build is not working
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- | |
Trying to figure out why incremental build is not working for larger | |
msbuild project but with similar structure as this one. | |
Here with targets defined as imported targets + separating as scrs/includes | |
and repeating scrs in includes + splitting the test target in BeforeTest, | |
CoreTest, AfterTest .... moving input/outputs test fix the issue | |
vsprompt> msbuild testincremental.proj /v:d /t:change | |
vsprompt> msbuild testincremental.proj /v:d /t:test | |
vsprompt> msbuild testincremental.proj /v:d /t:test | |
Incremental build now re-work as expected ... need to think if it's correct | |
fix or if it's a ms-build issue to act like this ... | |
--> | |
<!-- Inputs and outputs definitions --> | |
<PropertyGroup> | |
<Inputs1>.\Inputs1</Inputs1> | |
<Inputs2>.\Inputs2</Inputs2> | |
<Outputs>.\Outputs</Outputs> | |
</PropertyGroup> | |
<ItemGroup> | |
<SrcsFiles Include="$(Inputs1)\file1.txt;"/> | |
<IncludeFiles Include="$(Inputs1)\*.*;$(Inputs2)\**\*.*;"/> | |
</ItemGroup> | |
<!-- Importing targets from separate file --> | |
<Import Project=".\testincremental.targets"/> | |
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- Calculating inputs/outputs--> | |
<ItemGroup> | |
<MyInputs Include="@(SrcsFiles);@(IncludeFiles);$(MsBuildProjectFile);"/> | |
<MyOutputs Include="$(Outputs)\file1.txt;$(Outputs)\file2.log;"/> | |
</ItemGroup> | |
<!-- Update outputs --> | |
<PropertyGroup> | |
<TestDependsOn> | |
BeforeTest; | |
CoreTest; | |
AfterTest; | |
</TestDependsOn> | |
</PropertyGroup> | |
<Target Name="test" DependsOnTargets="$(TestDependsOn)"/> | |
<Target Name="BeforeTest"/> | |
<Target Name="CoreTest" Inputs="@(MyInputs)" Outputs="@(MyOutputs)"> | |
<MakeDir Directories="$(Outputs)"/> | |
<WriteLinesToFile File="$(Outputs)\file1.txt" Lines="kikou;" Overwrite="true"/> | |
<WriteLinesToFile File="$(Outputs)\file2.log" Lines="kikou;" Overwrite="true"/> | |
</Target> | |
<Target Name="AfterTest"/> | |
<!-- Modify inputs --> | |
<Target Name="change"> | |
<MakeDir Directories="$(Inputs1)"/> | |
<WriteLinesToFile File="$(Inputs1)\file1.txt" Lines="kikou;" Overwrite="true"/> | |
<WriteLinesToFile File="$(Inputs1)\file2.ext" Lines="kikou;" Overwrite="true"/> | |
<MakeDir Directories="$(Inputs2)"/> | |
<WriteLinesToFile File="$(Inputs2)\file1.txt" Lines="kikou;" Overwrite="true"/> | |
<WriteLinesToFile File="$(Inputs2)\file2.dum" Lines="kikou;" Overwrite="true"/> | |
<MakeDir Directories="$(Inputs2)\Sub1"/> | |
<WriteLinesToFile File="$(Inputs2)\Sub1\file1.rd" Lines="kikou;" Overwrite="true"/> | |
<WriteLinesToFile File="$(Inputs2)\Sub1\file2.mm" Lines="kikou;" Overwrite="true"/> | |
<MakeDir Directories="$(Inputs2)\Sub2"/> | |
<WriteLinesToFile File="$(Inputs2)\Sub2\file1.abc" Lines="kikou;" Overwrite="true"/> | |
<WriteLinesToFile File="$(Inputs2)\Sub2\file2" Lines="kikou;" Overwrite="true"/> | |
<MakeDir Directories="$(Inputs2)\Sub2\Sub3"/> | |
<WriteLinesToFile File="$(Inputs2)\Sub2\Sub3\file1.txt" Lines="kikou;" Overwrite="true"/> | |
<WriteLinesToFile File="$(Inputs2)\Sub2\Sub3\file2.svg" Lines="kikou;" Overwrite="true"/> | |
</Target> | |
</Project> |
Tadin, found why incremental is not working ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Give it up for now ... test case structure is now extremely similar to the project and things are still fine ... I'm screw... Indeed, next test is may be anti-virus or file-indexer ?