Easy One - Avoid Exception when AppSettings File is missing
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Here's a quick code change that I'd like to submit to Stride codebase -- just a few lines of code, to eliminate a pointless FileNotFound Exception at startup, from calling "YamlSerializer.Load".
Here's the code "as is now" from AppSettingsProvider:

Here's the code after I edited it:

What I did matches how it's done from the only other place in code that we call this method, where the File.Exists is checked beforehand to avoid using Exception for Program Flow:

So this just requires a few lines of code to change, and poof, it behaves the SAME but avoid throwing an exception.
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
Find AppSettingsProvider and inspect its call to YamlSerializer.Load; compare it with the other call site mentioned in the issue, where File.Exists is checked first. Confirm that startup with a missing app-settings file behaves the same without raising a FileNotFoundException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100