© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
1 reply
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
IMG_1984.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

❔ Dotnet Command
C#CC# / help
3y ago
Dotnet ef command
C#CC# / help
3y ago
✅ dotnet pack command fails
C#CC# / help
10mo ago