Reputation: 191
Lets say you have a solution with projects A and B. A needs to B be build at least once so in order to be built with MSBuild i need it to be some kind of reference to setup the order of build. But setting up the projects as a reference made it build always together and project B its slow to build while A alone its fast and its the one I need to build multiple times from Visual Studio.
Is there a way to still make MSBuild take the order B -> A on building while beeing capable of build only A from Visual Studio?
I tried to setup a .proj for MSBuild but i kinda dont really understand how it works. I tested putting the reference from .sln with
ProjectSection(ProjectDependencies)
and in .csproj with
<ProjectReference Include="..\B.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
edit: The reason why B needs to be built from time to time its that it can change too and its part of a repository and bin needs to be in .gitignore
edit2: In my case i was modifying some .proj that builds a lot of sln with this exact struct and in the end the "better" aproach was just modifying the sln file to put the project B first and done. 🙃
Upvotes: 0
Views: 64