C
C#5mo ago
Mango

Getting error when running dotnet command

When I run the command `dotnet ef dbcontext scaffold "Server=CTWV7S3-L\SQL2022;Database=Financials;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer --data-annotations --use-database-names --output-dir Entities --namespace Shelby.Core.DataLayer.Entities --context-namespace Shelby.Core.DataLayer’ I get the following error:
C:\Source\local\EntityFrameworkCore\EntityFrameworkCore\EntityFrameworkCore.csproj : error : Could not resolve SDK "Mic
rosoft.NET.Sdk". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and
resolve that message to correctly specify the SDK.
C:\Source\local\EntityFrameworkCore\EntityFrameworkCore\EntityFrameworkCore.csproj : error :   SDK resolver "Microsoft.
DotNet.MSBuildWorkloadSdkResolver" returned null.
C:\Source\local\EntityFrameworkCore\EntityFrameworkCore\EntityFrameworkCore.csproj : error :   The NuGetSdkResolver did
not resolve this SDK because there was no version specified in the project or global.json.
C:\Source\local\EntityFrameworkCore\EntityFrameworkCore\EntityFrameworkCore.csproj : error :   MSB4276: The default SDK
resolver failed to resolve SDK "Microsoft.NET.Sdk" because directory "C:\Program Files\dotnet\sdk\7.0.302\Sdks\Microso
ft.NET.Sdk\Sdk" did not exist.
C:\Source\local\EntityFrameworkCore\EntityFrameworkCore\EntityFrameworkCore.csproj : error MSB4236: The SDK 'Microsoft.
NET.Sdk' specified could not be found.
Unable to retrieve project metadata. Ensure it's an SDK-style project. If you're using a custom BaseIntermediateOutputPath or MSBuildProjectExtensionsPath values, Use the --msbuildprojectextensionspath option.
C:\Source\local\EntityFrameworkCore\EntityFrameworkCore\EntityFrameworkCore.csproj : error : Could not resolve SDK "Mic
rosoft.NET.Sdk". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and
resolve that message to correctly specify the SDK.
C:\Source\local\EntityFrameworkCore\EntityFrameworkCore\EntityFrameworkCore.csproj : error :   SDK resolver "Microsoft.
DotNet.MSBuildWorkloadSdkResolver" returned null.
C:\Source\local\EntityFrameworkCore\EntityFrameworkCore\EntityFrameworkCore.csproj : error :   The NuGetSdkResolver did
not resolve this SDK because there was no version specified in the project or global.json.
C:\Source\local\EntityFrameworkCore\EntityFrameworkCore\EntityFrameworkCore.csproj : error :   MSB4276: The default SDK
resolver failed to resolve SDK "Microsoft.NET.Sdk" because directory "C:\Program Files\dotnet\sdk\7.0.302\Sdks\Microso
ft.NET.Sdk\Sdk" did not exist.
C:\Source\local\EntityFrameworkCore\EntityFrameworkCore\EntityFrameworkCore.csproj : error MSB4236: The SDK 'Microsoft.
NET.Sdk' specified could not be found.
Unable to retrieve project metadata. Ensure it's an SDK-style project. If you're using a custom BaseIntermediateOutputPath or MSBuildProjectExtensionsPath values, Use the --msbuildprojectextensionspath option.
I have tried repairing my dotnet 8 SDK but no dice. Visual Studio 2022 installer can see the corner 8 runtime just fine
No description
1 Reply
Mango
Mango5mo ago
dotnet —version reports back as 8.0.101