Estoy tratando de realizar el mini tutorial de como integrar una base de datos existente en MySQL Con entity Framework y Net Core.
LINK del mini tutorial. https://dev.mysql.com/doc/connector-net/en/connector-net-entityframework-core-scaffold-example.html#connector-net-entityframework-core-scaffold-cli
Instale Net Core SDK
PS C:\> dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.1.403
Commit: 9e895200cd
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19041
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.403\
Host (useful for support):
Version: 3.1.9
Commit: 774fc3d6a9
.NET Core SDKs installed:
3.1.403 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Aplicar scaffolding a una base de datos con la CLI de .NET Core
Inicialice un proyecto de .NET Core válido y una aplicación de consola con la interfaz de línea de comandos (CLI) de .NET Core
dotnet new console –o sakilaConsole
y luego cambie a la carpeta recién creada ( sakilaConsole).
cd sakilaConsole
Lo que yo hago: Abro mi terminal en vs code
C:\Users\MyUser>
Me voy a la ruta raiz de mi disco duro
C:\Users\MyUser> cd c:\
Escribo el comando para crear un nuevo proyecto de consola
C:\> dotnet new console -o sakilaConsole
Me da este error:
PS C:\> dotnet new console -o sakilaConsole
Couldn't find an installed template that matches the input, searching online for one that does...
Usage: new [options]
Options:
-h, --help Displays help for this command.
-l, --list Lists templates containing the specified name. If no name is specified, lists all templates.
-n, --name The name for the output being created. If no name is specified, the name of the current directory is used.
-o, --output Location to place the generated output.
PS C:\> dotnet new console -o sakilaConsole
Couldn't find an installed template that matches the input, searching online for one that does...
Usage: new [options]
Options:
-h, --help Displays help for this command.
-l, --list Lists templates containing the specified name. If no name is specified, lists all templates.
-n, --name The name for the output being created. If no name is specified, the name of the current directory is used.
-o, --output Location to place the generated output.
-i, --install Installs a source or a template pack.
-u, --uninstall Uninstalls a source or a template pack.
--nuget-source Specifies a NuGet source to use during install.
--type Filters templates based on available types. Predefined values are "project", "item" or "other".
--dry-run Displays a summary of what would happen if the given command line were run if it would result in a template creation.
--force Forces content to be generated even if it would change existing files.
-lang, --language Filters templates based on language and specifies the language of the template to create.
--update-check Check the currently installed template packs for updates.
--update-apply Check the currently installed template packs for update, and install the updates.
Invalid input switch:
-o
sakilaConsole
Console Application (C#)
Author: Microsoft
Description: A project for creating a command-line application that can run on .NET Core on Windows, Linux and macOS
Options:
--langVersion Sets the LangVersion property in the created project file
text - Optional
--no-restore If specified, skips the automatic restore of the project on create.
bool - Optional
Default: false / (*) true
* Indicates the value used if the switch is provided without a value.
PS C:\>
No entiendo porque da el error tampoco me queda clara para que funciona la opcion
-o, --output Ubicación para colocar la salida generada.
Según lo que entiendo es que cuando cree mi nuevo proyecto de consola y lo va a colocar en la carpeta "sakilaConsole" ? en caso que este directorio no exista lo crea? Estoy siguiendo exactamente los pasos que me dicen que realize que estoy haciedo mal?