Skip to content

dotnet script doesn't obey version #622

Closed
@phatcher

Description

@phatcher

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy