Edit and debug CSX files
I have been playing with scriptcs and csx files. It would be awesome if LinqPad could edit and debug csx files just like linq ones. With Roslyn being the future, seems like it would be an important feature for LinqPad (which is awesome!! by the way)
-
Charles Miles commented
I am not a hardcore CSX user and for me being able to load and 'save as' a csx file with #r package imports (I am using the dotnet-script #r "nuget: AutoMapper, 6.1.0" style) and using statements handled correctly for 'C# Statement(s)' would be huge and cover what I need.
For me this is especially valuable because for a number of my scenarios it addresses 'running LinqPad scripts on the commandline on Linux' - I understand that many LinqPad specific features would not be supported, but probably fair to say that it does help support a large number of additional scenarios!
-
Nick Campau commented
Supporting the *.csx script file format natively in LinqPad would be super helpful to me. The ability to run *.csx files on any platform that .NET supports makes it the ideal scripting file. With that said I still enjoy using LinqPad as my editor/debugger for all the reasons that make LinqPad great. It would be great if the csx script files supported a simple external file import statement that contained all the LinqPad specific configuration settings that today are in the header of the *.linq file. Bonus points for the include script added support for LinqPad native functionality in the Util class. I realize that some functions within that class require LinqPad so a runtime check with exception if executed outside of LinqPad would be fine.
e.g.
#load "./linqpad.csx"; -
Cameron commented
This would be awesome!!! It would allow moving C# code between the ipad [https://goo.gl/DsjX1R], LinqPad, and Visual Studio in a single-file format.
-
Yoshifumi Kawai commented
I want it.
csx is some different with LINQPad's C# Expression and C# Statement.I'm trying latest roslyn scripting package "Microsoft.CodeAnalysis.CSharp.Scripting" (Nov, 14th)
It can define a class in the script file, returns last value, using in the script, #r, #load, etc...```
var aaa = 10;// define class in script
public class Foo
{
public int Bar {get; set;}
}// return
new Foo() { Bar = aaa }
```I think need to add new language mode(C# Scripting).