question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Suppor for single .cs (.csx) file

See original GitHub issue

Steps to reproduce

Open a *.cs file with VS Code.

Expected behavior

Get autocompletion for the script.

Actual behavior

There is no autocompletion.

Why?

It would be really nice if this would be supported, because it would really bring .net scripting to the next level. I could write script fast and efficiently and the use the dotnet script command to run them, avoiding all the soultion mesiness. Just doing simple stuff in C# super fast and easy.

Note: if I open a C# solution and then open a cs script which is not in the solution, everything is already working 😃.

How could this work wihtout solution?

Because .NET 6 already introduced that you don’t have to have an actual Main function in order to run a console app, I believe all the support should already be there. These scripts would just behave as if there is an .NET 6 console project soution in “the background”.

Extra

If I could run the code without saving it to the file that would be even more awesome, then C# would feel like an interprete language.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
DomenPigeoncommented, Feb 20, 2022

Oh I see, I am very sorry for the inconvenience and my inexperience … Thank you very much for your time and effort. And thank you for all your work on the Omnisharp and dotnet script project I like it very much 😄.

Will be closing thing issue now.

0reactions
filipwcommented, Feb 21, 2022

thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

What are .CSX C# files for? - Stack Overflow
C# Script File (.csx) Editing Support: The CTP introduces a concept of a C# Script File. ... So, it means a csx file...
Read more >
Code Generation using C# Scripts (CSX Scripts) in Visual Studio
CSX scripts inside Visual Studio have some support for Intellisense (auto-completion) and compile-time checks, but those features work much ...
Read more >
Support C# Script files (*.csx) : RIDER-14750 - YouTrack
Remark: Omnisharp only works on "projects", not on single files. Thus you have to open the folder containing the .csx file(s) in vscode,...
Read more >
Azure Functions C# script (.csx) developer reference
Understand how to develop Azure Functions using C# script.
Read more >
Any interest to support C# script ".csx" file extension?
csx " file format also supports reference to library/nuget, support reference to another .csx file, this is what LINQPad not supported. (And yes ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found