Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

How to add two Property to a project file with same name?

$
0
0

Hi,

I'm trying to add two Property to a project file with same name from code, the expected result like below.

<MyProperty>testvalue</MyProperty>

<MyProperty Condition=" 'MyProperty' == '' ">testvalue2</MyProperty>

I'm using Microsoft.Build.Evaluation.Project.SetProperty method to add the new property. However, this method only can add or override a property method, so not able to add duplicate properties with same name.

Could you please tell me how to achive this?

Regards,


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>