locked
Evaluate project property for different configurations RRS feed

  • Question

  • Hi

    How can I evaluate project properties for different configurations? I know about VCConfiguration for C++ projects but wondering if there is a way that works a cross project types not just VCProjects.

    I have found there is IVsBuildMacroInfo but is not clear how to use that to evaluate the property in different configurations.

    Wednesday, January 27, 2016 10:22 AM

All replies

  • Hi pepone.onrez,

    Thank you for your post. I am sorry that I can't understand your requirment clearly. Do you want to store different project properties informations according to multi configurations? Does Build Configurations could meet your need?
    https://msdn.microsoft.com/en-us/library/kkz9kefa.aspx

    Best Regards,
    Li Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, January 28, 2016 7:15 AM
  • Hi,

    I my extension I want to read the value of some project properties, this properties can evaluate to different values in different configurations. For VC++ projects I was using VCCconfiguration.Evaluate but this is somehow slow and only works well with VC++ projects.

    I was looking for something in the IVsXXX interfaces, seems that one option might be IVsPropertyStorage but maybe is a better fit. As it seems that I will have to call getProperty for each property and not just expand all the values in a single call like Evaluate.

    Thursday, January 28, 2016 9:27 AM
  • The problem with IVsPropertyStorage is that it doesn't allow to get unevaluated property value, that is helpful when you want users to edit the value.

    Also the C# project implementation of this interface Scapes the values, making it unusable for setting a property that references other properties. This doesn't happen in C++ projects.

    Tuesday, February 2, 2016 10:11 AM
  • Wednesday, February 3, 2016 5:39 AM
  • Because that causes the project to be reload in Visual Studio and display a warning about the project being modified outside Visual Studio.
    Wednesday, February 3, 2016 8:41 AM