Questions tagged [dotnet-script]
5 questions
2
votes
1 answer
FileLoadException when running C# script with .NET Core 3.1
I wrote the following C# script (HelloWorld.csx file):
#! "netcoreapp3.1"
#r "nuget: System.Text.Encoding.CodePages, 5.0.0"
public class Script
{
public static void Run()
{
try
{
…

Francois C
- 1,274
- 2
- 12
- 14
2
votes
0 answers
does "dotnet script" (csx) support ASP.NET Core app development?
I am checking out "dotnet script" (csx) available here: https://github.com/filipw/dotnet-script
I am able to get basic examples working fine. However, I am trying to check the possibility of ASP.NET Core using "dotnet script" (just using plain…

user203687
- 6,875
- 12
- 53
- 85
1
vote
1 answer
What's the difference between .cs with top-level statements and .csx programs?
As mentioned, I was wondering what is the difference between C# program with only top-level statements and no namespace nor main class and a csx script.
I'm using dotnet-script right now and it behaves the same for both .cs and .csx and I'm a bit…

Barstok
- 49
- 6
1
vote
0 answers
Could not load InplaceStringBuilder while creating WebHost from script
This script, which creates a web-server to serve a static static files, compiles and starts but unable to serve requests.
dotnet script server.csx
#r "nuget: Microsoft.AspNetCore, 2.2.0"
#r "nuget: Microsoft.AspNetCore.StaticFiles, 2.2.0"
#r "nuget:…

Alex Netkachov
- 13,172
- 6
- 53
- 85
0
votes
1 answer
How to avoid `dotnet-script` swallowing arguments
I'm using dotnet-script for the first time, I'm getting some undesirable behavior I don't know how to fix.
My script expects a "-v" argument, but instead of that getting passed through, dotnet-script swallows it and prints out its own version…

Dov
- 15,530
- 13
- 76
- 177