-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Support for CSharp Script #1141
Comments
There isn't currently a way to tell CSharpier which files to format and with which formatter, but I do have a branch where I have csproj/xml formatting mostly done and will need to figure it out. For now though it will be easy to change the hardcoded ".cs" checks in the cli to ".cs/.csx". Changing the extensions should also happen, but is probably less important. |
Hi, thanks @belav but now there is another problem, can this issue be open again or should I open a new issue? If I try to run Csharpier in my file, the following error appears:
As I can see, CSharpier cannot process files with the #!/usr/bin/env dotnet-script
#load "other.csx"
WriteLine("Hello World"); If I remove those lines, CSharpier works as expected. UPDATE // Example
#r "nuget: AngleSharp, 1.1.0"
|
That's my bad, I assumed csx were just regular c# code and only tested that way. From my googling it looks like Roslyn can still parse it into a syntax tree, so it should be straightforward for me to get working, it just won't be the two line change that I hoped. |
Hi guys. I'm having some issues trying to format my C# scripts.
C# can be used for scripting. There are tools like dotnet-script to run those files. C# scripts use the
.csx
extension but csharper doesn't support it. Is there a way to force csharper to format those files?Input:
dotnet-csharpier ./main.csx
Output:
Warning ./main.csx - Is an unsupported file type.
Expected behavior:
The file formatted.
The text was updated successfully, but these errors were encountered: