Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Improve Code Runner behavior for F# projects vs scripts #1205

Open
wizzardx opened this issue Jan 11, 2025 · 0 comments
Open

Comments

@wizzardx
Copy link

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 [PATCH] Rust uses rustc instead of cargo (fix included!) #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.

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

No branches or pull requests

1 participant