MSBuild: Conditional Construct (Project Reference | File Reference)

前端 未结 2 1668
遥遥无期
遥遥无期 2021-01-06 16:51

I´m still trying to eleminate the need of a cobol compiler in a Project with cobol-Projects in it.

Is it possible to create following build behaviour:

If the

相关标签:
2条回答
  • 2021-01-06 17:23

    Regarding the conditional 'how', assuming you have either

    <ProjectReference ...>...</ProjectReference>
    

    or

    <Reference ...>...</Reference>
    

    you want to hand-edit the .proj file to include both thusly

    <ProjectReference Condition="'$(Configuration)'!='DebugVB'" ...>...</ProjectReference>
    <Reference Condition="'$(Configuration)'=='DebugVB'" ...>...</Reference>
    
    0 讨论(0)
  • 2021-01-06 17:30

    Almost forgot this question: the answer from Brian works perfectly for me.

    And to answer the second part of the question:

    It indeed eliminates the need for a cobol compiler on every maschine if you setup different Configurations.

    Thanks Brian.

    0 讨论(0)
提交回复
热议问题