Quantcast
Channel: MSBuild forum
Viewing all articles
Browse latest Browse all 2763

explain me this...

$
0
0

Ok, here's what I have

  <ItemGroup>
   <MyFileInput Include="@(MyFileFile)" Condition="'%(MyFileFile.ExcludedFromBuild)' != 'true'" />
  </ItemGroup>

  <ItemGroup Condition="'@(SelectedFiles)' != ''">
   <MyFileInput Remove="@(MyFileInput)" Condition="'%(Identity)' !='@(SelectedFiles)'" />
  </ItemGroup>

My question now is why this works.

1) in the first condition I have to write "MyFileFile." and I cannot use "%(ExcludedFromBuild)" because this gives me a MSB4096 error... why can I not do this?

2) Why are not ALL files in MyFileFile inserted into MyFileInput, if ONE MyFileFile has the ExcludedFromBuild not set?

3) Same question for the removal... why are not ALL files removed.

4) What does the second condition do? Compare if the "Identity" of the file is equal to ALL SelectedFiles? How can this ever become true???

I know, there are iterations over those groups... but. Sorry, does someone understand those? Are they logical? ... who invented this? ...

Rudolf



Viewing all articles
Browse latest Browse all 2763