Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. #647

Open
demobugcy opened this issue Sep 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@demobugcy
Copy link

net8环境,我在DataAccess 模块添加efcore Design,再运行项目出现如下错误,但是改成8.0.3就没有问题,我想知道在项目中有没有具体的对应版本,例如net8对应多少的efcore Design,net6 对应多少的efcore Design

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at WalkingTec.Mvvm.Mvc.FrameworkServiceExtension.AddWtmContext(IServiceCollection services, IConfiguration config, Action1 options) at backend.Startup.ConfigureServices(IServiceCollection services) in c:\Users\Demo\Downloads\backend\backend\Startup.cs:line 56 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span1 copyOfArgs, BindingFlags invokeAttr)
at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services, Object instance)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass7_0.b__0(HostBuilderContext context, IServiceCollection services)
at Microsoft.Extensions.Hosting.HostBuilder.InitializeServiceProvider()
at Microsoft.Extensions.Hosting.HostBuilder.Build()
at backend.Program.Main(String[] args) in c:\Users\Demo\Downloads\backend\backend\Program.cs:line 16

安装命令:dotnet add package Microsoft.EntityFrameworkCore --version 8.0.8

@demobugcy demobugcy added the bug Something isn't working label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant