0

I am trying to create a web app using asp.net core in terminal on MacOS v10.14.5 using yeoman.

dotnet restore dotnet new restore dotnet restore new

┌────────────────────────────────────────────────────────────┐
│                   yo update check failed                   │
│            Try running with sudo or get access             │
│            to the local update config store via            │
│ sudo chown -R $USER:$(id -gn $USER) /Users/Ezekill/.config │
└────────────────────────────────────────────────────────────┘
Ezekills-MacBook-Pro:webapp Ezekill$ ls
MacApp
Ezekills-MacBook-Pro:webapp Ezekill$ cd MacApp
Ezekills-MacBook-Pro:MacApp Ezekill$ ls
Controllers         Program.cs          Views                                           global.json
Data                Properties              appsettings.Development.json    web.config
MacApp.csproj           README.md           appsettings.json            wwwroot
MacApp.db           Services            bower.json

Models Startup.cs bundleconfig.json Ezekills-MacBook-Pro:MacApp Ezekill$ dotnet restore A compatible installed dotnet SDK for global.json version: [1.0.0- rc4-004771] from [/Users/Ezekill/Desktop/webapp/MacApp/global.json] was not found Please install the [1.0.0-rc4-004771] SDK or update [/Users/Ezekill/Desktop/webapp/MacApp/global.json] with an installed dotnet SDK: 2.1.302 [/usr/local/share/dotnet/sdk] 2.1.500 [/usr/local/share/dotnet/sdk] 2.1.505 [/usr/local/share/dotnet/sdk] 3.0.100-preview5-011568 [/usr/local/share/dotnet/sdk] Ezekills-MacBook-Pro:MacApp Ezekill$ dotnet restore A compatible installed dotnet SDK for global.json version: [1.0.0-rc4-004771] from [/Users/Ezekill/Desktop/webapp/MacApp/global.json] was not found Please install the [1.0.0-rc4-004771] SDK or update [/Users/Ezekill/Desktop/webapp/MacApp/global.json] with an installed dotnet SDK: 2.1.302 [/usr/local/share/dotnet/sdk] 2.1.500 [/usr/local/share/dotnet/sdk] 2.1.505 [/usr/local/share/dotnet/sdk] 3.0.100-preview5-011568 [/usr/local/share/dotnet/sdk]

To dotnet restore the webapp folder but it throws something about an update or install?

2 Answers2

0

The yeoman generators for .NET Core are old, very old. It's trying to use .NET Core version 1.0.0-rc4-004771. I suggest you try and generate a new project using the built-in templates with dotnet new.

Henk Mollema
  • 44,194
  • 12
  • 93
  • 104
  • How do i go about that? I doing an online udemy course so im getting step by step instructions. Not sure how to go about what you have suggested. – Rich.A.Scoty Jun 03 '19 at 13:55
  • You should find a new course. That one is apparently *very* outdated. It's using .NET Core 1.0, which is EOL and vastly differs from the current LTS version, 2.1. Yeoman generators is really the least of your problems here. Virtually everything you learn will be wrong, because it doesn't work that way any more. – Chris Pratt Jun 03 '19 at 14:04
  • Ok thanks you for your advice. I will search for a more resent course. – Rich.A.Scoty Jun 03 '19 at 14:14
  • You could get started by just typing `dotnet new` in the console and choose a template which you'd like to create. – Henk Mollema Jun 03 '19 at 14:40
0

Fixed it..

Instead of using Yeoman to build the wepapp in the webapp folder I used command: dotnet new webapp while in the webapp directory instead of command: yo aspnet

Thanks for your help.