0
votes

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

2 Answers

0
votes

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.

0
votes

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.