I am following a tutorial from a book to learn .NET 9.
Summary:
The tutorial starts by creating Two 'projects' in a solution that will be used throughout the remainder of the book.
The projects are called 'DataContext' and 'EntityModels'
At this point in the tutorial, there really isn't any code made yet. There is a database that is created already with test data. The purpose of these projects is to create the scaffolding of the Models of the database I assume. I have 'built' the projects successfully without error.
Problem:
The book gives the instruction to run a CLI command as follows:
dotnet-ef dbcontext scaffold "Data Source=tcp:127.0.0.1,1433;Initial Catalog=Northwind;User Id=sa;Password=s3cret-Ninja;TrustCertificate=true;" Microsoft.EntityFrameworkCore.SqlServer --namespace Northwind.EntityModels --data-annotations
When I run the above command, I get the following:
MSBUILD : error MSB1008: Only one project can be specified.
Full command line: 'C:\Program Files\dotnet\sdk\9.0.300\MSBuild.dll -maxcpucount -verbosity:m -tlp:default=auto -nologo -restore -consoleloggerparameters:Summary dbcontext scaffold Data Source=tcp:127.0.0.1,1433;Initial Catalog=Northwind;User Id=sa;Password=s3cret-Ninja;TrustCertificate=true; Microsoft.EntityFrameworkCore.SqlServer --namespace Northwind.EntityModels --data-annotations -distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,C:\Program Files\dotnet\sdk\9.0.300\dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,C:\Program Files\dotnet\sdk\9.0.300\dotnet.dll'
Switches appended by response files:
Switch: scaffold
For switch syntax, type "MSBuild -help"
I am unable to find any useful documentation or helpful suggestions on what this error relates to. However, when I run the --help for dotnet ef I can see that 'scaffold' is not a command for the CLI tool.
Environment and Other Set up Data:
- Windows 11
- .NET 9
- Book being used is called, "Real-World Web Development with .NET 9" by Mark J Price
I can provide the link to a github repo that has my source code on the progress so far if that helps.