Skip to content

Conversation

@nickclark2016
Copy link
Member

What does this PR do?

Adds support for VS 2026. This includes the new solution format, which is XML based. See schema here: https://github.com/microsoft/vs-solutionpersistence/blob/main/src/Microsoft.VisualStudio.SolutionPersistence/Serializer/Xml/Slnx.xsd

This also adds support for the new C++ toolchain, v145.

How does this PR change Premake's behavior?

No changes to existing code.

Anything else we should know?

No

Did you check all the boxes?

  • Focus on a single fix or feature; remove any unrelated formatting or code changes
  • Add unit tests showing fix or feature works; all tests pass
  • Mention any related issues (put closes #XXXX in comment to auto-close issue when PR is merged)
  • Follow our coding conventions
  • Minimize the number of commits
  • Align documentation to your changes

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

@nickclark2016 nickclark2016 requested a review from a team September 11, 2025 05:01
@samsinsane samsinsane merged commit d18920d into premake:master Sep 13, 2025
51 checks passed
@avail
Copy link

avail commented Sep 24, 2025

Doesn't seem to work correctly on projects with more complicated configurations/platforms

configurations({
    "Debug Dev",
    "Debug Final",
    "Debug Classic",

    "Release Dev",
    "Release Final",
    "Release Classic",
})

platforms({
    "SP",
    "FiveM",
    "RageMP",
})

results in a : error : Cannot load project: project does not contain requested configuration Debug Classic|FiveM. Please verify that .sln file is valid and uses only existing project configurations.

EDIT: it would seem that VS itself is incapable of supporting such platform configuration anymore. When trying to manually create a custom platform it gives New project platforms cannot be created because this new solution platform is not supported by any of the projects.

@nickclark2016
Copy link
Member Author

Would you mind opening this as an issue?

@avail
Copy link

avail commented Sep 24, 2025

I've opened an issue on microsoft's side cause adding normal custom platforms through the configuration manager doesn't work (while opening a regular old .sln with those same custom platforms works fine), so let's see what they reply https://developercommunity.visualstudio.com/t/Solutions-with-custom-Platform-names-no/10972388

EDIT: Okay, it's apparently "by design" now that custom platform names aren't supported

@nickclark2016
Copy link
Member Author

I've opened an issue on microsoft's side cause adding normal custom platforms through the configuration manager doesn't work (while opening a regular old .sln with those same custom platforms works fine), so let's see what they reply https://developercommunity.visualstudio.com/t/Solutions-with-custom-Platform-names-no/10972388

EDIT: Okay, it's apparently "by design" now that custom platform names aren't supported

Just saw your edit. Really appreciate you opening that up on the VS side. I'm not really sure if there's something useful we can do from the Premake end to make it work, unfortunately.

@avail
Copy link

avail commented Oct 2, 2025

Just saw your edit. Really appreciate you opening that up on the VS side. I'm not really sure if there's something useful we can do from the Premake end to make it work, unfortunately.

One can still open .sln files in VS2026 and have custom platforms work on those. but for .slnx it's not supported

@redorav
Copy link
Collaborator

redorav commented Oct 3, 2025

I think it's possible, if I get one of the generated sln files and right click save as in VS2026 it converts it to an slnx file that opens properly. I've added a zip file that contains the slnx generated by premake, the one saved by visual studio, the original one it comes from, and the lua, for testing.

hlsl++_slnx.zip

@avail
Copy link

avail commented Nov 7, 2025

yeah @nickclark2016 as above, if converting an existing .sln to a .slnx from visual studio, it opens just fine. it seems VS adds stuff into the <project> section into the slnx (left is generated by VS, right is by premake)
Code_mPmNKG4FXv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants