premake / premake-core

Premake
https://premake.github.io/
BSD 3-Clause "New" or "Revised" License
3.2k stars 618 forks source link

startproject ignored if workspace is set to the same name as another project within the workspace #2220

Open danieldownes opened 3 months ago

danieldownes commented 3 months ago

What seems to be the problem? We have a workspace called "OurEngine", with a project also titled "OurEngine" that compliles to a lib. We have another project called "Sandbox" that compiles to a ConsoleApp. Naturally we want the start project to be "Sandbox".

However the solution always sets the start project to "OurEngine" in the generated VS 2022 sollution.

If we change the workspace xor project name to "OurCoolEngine", so that the names are different, then the start project is set correctly.

What did you expect to happen? A clear and concise description of what you expected to happen. Allow the startproject to point to a different project, if the workspace and a project whos name matches the workspace project.

What have you tried so far? Describe any steps you've taken to try to solve or workaround the bug.

How can we reproduce this?

What version of Premake are you using? premake5 (Premake Build Script Generator) 5.0.0-beta2

Anything else we should know? Add any other context about the problem here.

(You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to issues like these!)

danieldownes commented 3 months ago

It appears this may be a caching issue with VS. But I am unsure, if I set the start project manually in VS, delete all the VS files, then regenerate it does indeed retain the intended start project.

samsinsane commented 2 months ago

It appears this may be a caching issue with VS.

This is correct, the cache is in the .vs folder beside the .sln file. If you delete that folder, you should see the start up project change. I'm not sure there's much we can do to resolve the issue though, I'm fairly certain those files are opened exclusively by VS and are in some binary format.