In our solution we have more than 150 projects, now most of projects are using some .js
file, which is generated by another project. So I need build this project before others. I know I can set the other projects are reference this project, but the problem is that we have nearly 100 projects that needs those .js
file, add this project as reference project to 100 projects is not the best option.
So how can I set the build order without adding project reference?
Thanks any advice.
In Visual Studio, for each project that depends on your dependant project X:
Sadly, selecting multiple projects (at least in VS2017) won't let you apply the settings to more than one project at a time
You do not want to set project reference or project dependencies to each of those 100 projects, but there is no such option that you can set multiple references at once.
To resolve this problem, I would like provide you two workarounds.
Build that referenced project first, then build the solution.
In this way, you should pay a attention to manually build the referenced project first. It seems you are not independent developer, this way should not the best option.
Using batch file to set the build order.
You can use batch file to set build order, build the referenced project first, then build the solution:
Hope this helps.