How to separate some properties from the main MSBuild file

Since the old days when I was a java developer, I could create separate ant scripts which I would call from my main ant script. I would put properties that are unique to each environment where my main script will run. I want to do the same in MSBuild, but can't figure out how to group MSBuild scripts together.

+1


source to share


2 answers


You need to Import them.



   <Import Project="MyTargets" Condition="Exists('MyTargets')"/>

      

+3


source


The import is definitely useful, you can also actively link to other projects:



<MSBuild Projects="Other.proj" Properties="SomeProp=$(MyProperty)" />

      

+1


source







All Articles