Net5.0 game builds do not use Game.LaunchParameters (Command line arguments)
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Release Type: 4.0 Official Release
Version: 4.0.1.1.1400
Platform(s): Windows
Describe the bug
When targetting net5.0-windows, the game no longer produces launch parameters through Game.LaunchParameters. They are available when targetting net framework.
To Reproduce
Steps to reproduce the behavior:
- Create a new basic project.
- Modify the BasicCameraController Start method to access Game.LaunchParameters
- You will see the key value pairs when targetting net framework
- You will NOT see the key value pairs when targetting net5.0-windows
Expected behavior
I would expect command line arguments to be available in any target.
I would upload a repo but this is faster to reproduce through the launcher using the steps above and I verified issue exist with a brand new clean project.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the BasicCameraController Start method and inspect how Game.LaunchParameters is populated for net framework versus net5.0-windows targets. Reproduce the issue in a new basic project using the Stride launcher, then confirm that command-line key-value pairs are available for both targets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100