tags:

views:

16

answers:

1

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  A: 

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

madgnome
True, this will solve the problem. Unfortunately, LocalOptions.xml has a role to set properties that are used by the targets in the Primary Build file. But, your suggestion made me think that I can add another file that is imported at the end of the Primary Build file. Thanks.
bobs