Can someone help me understand Property Condition usage a bit better?
-
Thursday, March 01, 2012 2:40 PM
I see many examples of Property elements being using a syntax like the following:
<AfterAddIisSettingAndFileContentsToSourceManifest Condition="'$(AfterAddIisSettingAndFileContentsToSourceManifest)'==''"> $(AfterAddIisSettingAndFileContentsToSourceManifest); SetCustomACLs; </AfterAddIisSettingAndFileContentsToSourceManifest>
What I don't understand is this, if the Condition just verified that the property is not set,
'$(AfterAddIisSettingAndFileContentsToSourceManifest)'==''
then why bother calling the property?
'$(AfterAddIisSettingAndFileContentsToSourceManifest);
All Replies
-
Friday, March 02, 2012 2:32 AMModerator
Hi Hugh
Based on above code, it seems to define a propery with a condition to check if it is defined before. If it is not defined, set it as SetCusyomACLs.
I agree with you, the $(AfterAddIisSettingAndFileContentsToSourceManifest); seems useless in the property defination depends on above code only.
Regards,
Yi
Yi Feng Li [MSFT]
MSDN Community Support | Feedback to us
- Marked As Answer by Hugh Kelley MTRL Wednesday, March 07, 2012 12:15 PM
-
Wednesday, March 07, 2012 6:53 AMModerator
Hi,
I am writing to check the status of the issue on your side. Would you mind letting us know the result of the suggestions?
Yi
Yi Feng Li [MSFT]
MSDN Community Support | Feedback to us
-
Wednesday, March 07, 2012 12:17 PM
I think you've answered my question. I was ultimately able to follow the breadcrumbs all the way from my initial .csproj file to my .wpp.targets file and now have at least a fuzzy idea of how it all connects.

