Alter <ItemGroup> Content Sequence

喜欢而已 提交于 2019-12-24 12:52:57

问题


I have a primary build file that is managed through source control. It contains a project <Import> that adds a project that contains settings unique to the local environment. I want to add a temporary project to my copy of the local project file, so I have the following.

Primary Build File:

<Project>
  <Import Project="LocalOptions.xml" />

  <ItemGroup>
    <CatalogProject Include="$(SolutionRoot)\MainProject\MainProject.vbproj"/>
  </ItemGroup>

</Project>

Local Project File:

<Project>

  <ItemGroup>
    <CatalogProject Include="$(SolutionRoot)\LocalProject\LocalProject.vbproj"/>
  </ItemGroup>

</Project>

My problem is that my temporary project depends on one of the projects referenced in the primary build file. But, my temporary file appears before the dependent file in the <ItemGroup> list.

How can I alter the local project file so that my project file is the last file in the list?


回答1:


Why don't you import LocalOptions.xml at the end of the file after CatalogProject declaration? It'll solve your problem.



来源:https://stackoverflow.com/questions/3278168/alter-itemgroup-content-sequence

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!