ASP.NET 5 : Is the “dotnet” command replacing “dnu” and “dnx” commands?

前端 未结 2 775
太阳男子
太阳男子 2021-01-01 20:48

Today, I was following multiple tutorial to run a C# application on Linux but always got stuck at the command dnu restore which was returning me a not fou

2条回答
  •  醉酒成梦
    2021-01-01 21:40

    Here the basic things

    1 dnu restore & dnx run works for version 1.0.0-rc1-update2 coreclr x64 (check using dnvm list) and project.json file needs minimum

    "compilationOptions": {
    "emitEntryPoint": true
    },
    "frameworks":{
        "dnxcore50":{
            "dependencies": {
                "System.Console":"4.0.0-*"
            }
        }     
    }        
    

    2 dotnet restore & dotnet run works for version 1.0.0-rc2-23811 and project.json file needs minimum

    "compilationOptions": {
        "emitEntryPoint": true
    },
    "dependencies": {
        "NETStandard.Library": "1.0.0-rc2-23811"
    },
    "frameworks": {
        "dnxcore50": { }
    }
    

    Along with this need NuGet.config file.

    Now, based on How project.json file configured and dnvm active set, you need to use command.

提交回复
热议问题