Open 344089386 opened 1 month ago
This is a temp file containing a complete C# code created from your C# code fragment that is a script. The script creates this file and then passes it to the C# compiler that is configured on your system. So something deleting or locking this file. Can it be antivirus?
If it becomes unusable you can try to change the compiler engine with the -ng
switch. Check all available options with css -ng ?
But from my memory
css -ng:dotnet sample.cs
css -ng:csc sample.cs
css -ng:csc-inproc sample.cs
css -ng:roslyn-inproc sample.cs
css -ng:roslyn sample.cs
I haven't used 'css -ng :dotnet', can you give me a detailed link? @oleg-shilo
You just execute css -ng ?
and it will print the CLI usage of this switch.
Alternatively, you can specify the same switch directly from the script code. IE:
//css_ng dotnet
<your script code>
CS-Script always converts C# script into an assembly and executes it.
What this switch does it tells CS-Script which C# compiler to use for building the assembly.
dotnet
- means prepare a C# project on-fly, build the assembly and destroy the project (part of .NET SDK)csc
- means compile assembly from C# source file with csc.exe C# compiler (part of .NET SDK) as external processroslyn
- means compile assembly from C# code with .NET Roslyn Compiler (compiler-as-service nuget package)
Occasional: Could not find a part of the path 'C:\Users\semitech\AppData\Local\Temp\CSSCRIPT\36880.d03ac708-8d9d-4062-9763-503deb6a1852.tmp.cs'.
What's going on, please