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

Csharprepl cannot find script in current working directory #310

Closed
amine-aboufirass opened this issue Oct 3, 2023 · 0 comments · Fixed by #321
Closed

Csharprepl cannot find script in current working directory #310

amine-aboufirass opened this issue Oct 3, 2023 · 0 comments · Fixed by #321
Assignees
Labels
bug Something isn't working

Comments

@amine-aboufirass
Copy link

Version

0.6.5

What happened?

If I create a simple hello world CSX script file in my current working directory and then try to run it using csharprepl test.csx in my Powershell terminal I get the following output:

Welcome to the C# REPL (Read Eval Print Loop)!
Type C# expressions and statements at the prompt and press Enter to evaluate them.
Type help to learn more, exit to quit, and clear to clear your terminal.

Running supplied CSX file...
┌────────────────────────────────────────Exception────────────────────────────────────────┐
│ (1,7): error CS1504: Source file 'test.csx' could not be opened -- Could not find file. │
└─────────────────────────────────────────────────────────────────────────────────────────┘

The weird thing is that when I do Directory.GetCurrentDirectory() I indeed get back my current working directory.

To actually get it to work I need to run

csharprepl (ls test.csx | select -expandproperty fullname)

To retrieve the full file name, which is not ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants