New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to set the startup project when multiple projects are defined? #462
Comments
You should be able to set the startup project using the VSSolution function with the .SolutionBuildProject property. http://www.fastbuild.org/docs/functions/vssolution.html P.S. Love your game ;d |
The SolutionBuildProject is the F7 key (build solution). I'm talking about the F5 key (start debugging) which has an option of "build startup project and lauch with the debugger attached". In this case the startup project ends up being the first in the list as I described above. Also, how did you know I work on Factorio? :) |
I did some tests locally, and the behavior of which project is the active project by default seems more complex than simply being based on order. As an example, I experienced the following with the FASTBuild.sln:
As you noted, .SolutionBuildProject impacts which project is built when doing a solution build. Just to be sure it wasn't impacting the priority somehow, I removed setting it. It seemed to not change the behavior of the default selected project at all. Conceivably, if we could understand the logic being used, we might be able to manipulate the project layout to control what is selected, but the current ordering is as it is in order to exactly match what Visual Studio saves out so that you don't get massive deltas if you manually change the project and save. Perhaps this can be controlled with an option on the Solution() so you can opt-in. Maybe I've misunderstood you, but I think right now we don't really know exactly how the default project is actually chosen. |
@Rseding91 Sorry I didn't got the question on the first time. P.S. well, friday facts are my bread and butter, so your nickname is quite know to me already ;d I do especially like the technical ones as a developer :P @ffulin I know that the premake5 team did work it out how it's done, I've just checked if it really works and you may look at the generated differences with this example premake5 file. https://gist.github.com/Dandielo/6c71ee8ebef3e1fe5bae29215be964b5 And run it with the command 'premake5 vs2017' in the same location where this file is located. And here is a small comment how it's probably working. https://github.com/premake/premake-core/blob/master/modules/vstudio/vs2005_solution.lua#L72 Generally you just move the group and all it's child projects to the top of each section in the solution file. |
Create another workspace section after your projects then add the line startproject "ProjectRequired" in premake |
Right now from what I've found Fastbuild sorts 'SolutionProjects' alphabetically and when no .suo file is generated Visual Studio selects the first project as the "Startup Project" (the project that builds and launches when you press F5).
Is there currently any way to override this behavior and set the startup project through the .bff script? Or perhaps a way to not sort the 'SolutionProjects' so I can just define the order they're listed in the file which would also address this?
The text was updated successfully, but these errors were encountered: