Closed
Description
I'm trying to run a script as NET Core 3.1 but dotnet script main.csx
is not obeying the version, at the top of my file I have
#! "netcoreapp3.1"
and in lauch.json I have
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Script Debug",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": [
"exec",
"${env:USERPROFILE}/.dotnet/tools/.store/dotnet-script/1.1.0/dotnet-script/1.1.0/tools/netcoreapp3.1/any/dotnet-script.dll",
"${file}"
],
"cwd": "${workspaceRoot}",
"stopAtEntry": true
}
]
}
My ```dotnet script --info`` reports
Version : 1.1.0
Install location : C:\Users\paulh\.dotnet\tools\.store\dotnet-script\1.1.0\dotnet-script\1.1.0\tools\net5.0\any
Target framework : net5.0
.NET Core version : 5.0.6
Platform identifier : win
Runtime identifier : win10-x64
The script is old and can't run as .NET 5.0 as most of the referenced nuget packages do not support it. There are netcoreapp2.1 and netcoreapp3.1 directories as well as the net5.0 in the dotnet-script folder which suggests this si supported?
Metadata
Metadata
Assignees
Labels
No labels