formulahendry / formulahendry/vscode-code-runner
[Feature request] Improve Code Runner behavior for F# projects vs scripts
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 351
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
When working with F# projects (containing .fsproj files), Code Runner defaults to using `fsi` (F# Interactive) instead of properly building and running the project. This creates confusion, especially for new F# developers, because:
- The "Run Code" button is prominently displayed but produces unexpected behavior
- The correct solution (F5/debug) is less discoverable
- The current behavior ignores the project context, treating project files like standalone scripts
- Similar issues have been addressed for other languages (e.g., Rust with Cargo.toml detection in #837)
**Describe the solution you'd like**
Code Runner should:
1. Automatically detect when a file is part of an F# project (presence of .fsproj)
2. Default to `dotnet run` when a .fsproj is present
3. Use `fsi` only for standalone .fsx script files
4. Implement this detection in a cross-platform way within Code Runner itself
This would improve the out-of-box experience for F# developers and align with how Code Runner handles other compiled languages, removing the need for users to implement platform-specific workarounds in their settings.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.