0

Recently I installed version 2.0 of the Apsnet core SDK on my Deepin Linux. I'm using Yeoman for template generation. However, templates are always generated based on version 1.0 of the SDK. Changing the version directly in the Global.json file does not work. Is there any way I can change the default version in Yeoman to work only with version 2.0 of the SDK?

Thank you.

My current version of dotnet:

$ dotnet --version
2.0.0

Default global.json generated by yeoman:

{
  "sdk": {
    "version": "1.0.0-rc4-004771"
  }
}

When I try to run the project, I receive the following message:

The specified SDK version [1.0.0-rc4-004771] from global.json [/home/rogerio/Documents/console app/helloWorld/global.json] not found; install specified SDK version Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

    //Don't work
    {
      "sdk": {
        "version": "2.0.0"
      }
    }
//Segmentation fault is returned
Rogério Oliveira
  • 414
  • 1
  • 4
  • 15

1 Answers1

1

yo aspnet project is a little bit "dead". If you check repository on github, you will find that last update was 9 months ago.

Just use official dotnet new scaffolding tool, that is part of .NET Core CLI.

Set
  • 47,577
  • 22
  • 132
  • 150
  • You're right. I did not notice that the Yeoman .net templates were outdated (based on version 1 of the SDK). Now, I'm using "dotnet new" for the generation of projects. Thank you. – Rogério Oliveira Mar 05 '18 at 00:24