简体   繁体   中英

How Can I check if $property exist in a list @properties in msbuild

I have a list of properties that return some list of strings value v1;v2;V3. I have property that contain a string value and I need to check if this value contain in the list of string, if the value exist return an error

<Error Condition="@(ListOfValues)== $(property)" Text="This Value already exists!"/>

it doesn't seem it is working

我自己解决了

<Error Condition="%(ListOfValues.Identity)== $(property)" Text="This Value already exists!"/>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM