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?
Why don’t you import
LocalOptions.xmlat the end of the file afterCatalogProjectdeclaration? It’ll solve your problem.