【发布时间】:2021-06-14 02:04:46
【问题描述】:
我在 Linux 上使用 JetBrains Rider。每当我运行dotnet ef migrations add InitialCreate 时,它都会在终端中执行此操作并给我这个错误:
Build started...
Build succeeded.
Xlib: extension "NV-GLX" missing on display ":0.0".
Xlib: extension "NV-GLX" missing on display ":0.0".
0104:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
System.PlatformNotSupportedException: Cannot find 'Mono.SystemDependencyProvider, System' dependency
at Mono.DependencyInjector.get_SystemProvider () [0x0003d] in <a9da539eb2f94b1a84ab84db52450d46>:0
at System.Security.Cryptography.X509Certificates.X509Helper.get_CertificateProvider () [0x00000] in <a9da539eb2f94b1a84ab84db52450d46>:0
at System.Security.Cryptography.X509Certificates.X509Helper.Import (System.Byte[] rawData, Microsoft.Win32.SafeHandles.SafePasswordHandle password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags)
[0x00000] in <a9da539eb2f94b1a84ab84db52450d46>:0
at System.Security.Cryptography.X509Certificates.X509Certificate..ctor (System.String fileName, System.String password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) [0x0003e] in <a9da539eb2f94
b1a84ab84db52450d46>:0
at System.Security.Cryptography.X509Certificates.X509Certificate..ctor (System.String fileName) [0x00000] in <a9da539eb2f94b1a84ab84db52450d46>:0
at System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromSignedFile (System.String filename) [0x00000] in <a9da539eb2f94b1a84ab84db52450d46>:0
at System.Security.Policy.Evidence.GetDefaultHostEvidence (System.Reflection.Assembly a) [0x00097] in <a9da539eb2f94b1a84ab84db52450d46>:0
at System.AppDomain.get_Evidence () [0x00045] in <a9da539eb2f94b1a84ab84db52450d46>:0
at (wrapper remoting-invoke-with-check) System.AppDomain.get_Evidence()
at System.AppDomain.CreateDomain (System.String friendlyName, System.Security.Policy.Evidence securityInfo, System.AppDomainSetup info) [0x000de] in <a9da539eb2f94b1a84ab84db52450d46>:0
at Microsoft.EntityFrameworkCore.Tools.AppDomainOperationExecutor..ctor (System.String assembly, System.String startupAssembly, System.String projectDir, System.String dataDirectory, System.String rootNamespace, System.String lang
uage, System.String[] remainingArguments) [0x0004c] in <27660142d7fa4f02b91c8d5e3bfbdb6d>:0
at Microsoft.EntityFrameworkCore.Tools.Commands.ProjectCommandBase.CreateExecutor (System.String[] remainingArguments) [0x00042] in <27660142d7fa4f02b91c8d5e3bfbdb6d>:0
at Microsoft.EntityFrameworkCore.Tools.Commands.MigrationsAddCommand.Execute (System.String[] args) [0x00000] in <27660142d7fa4f02b91c8d5e3bfbdb6d>:0
at Microsoft.EntityFrameworkCore.Tools.Commands.CommandBase+<>c__DisplayClass0_0.<Configure>b__0 (System.String[] args) [0x0003b] in <27660142d7fa4f02b91c8d5e3bfbdb6d>:0
at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute (System.String[] args) [0x000df] in <27660142d7fa4f02b91c8d5e3bfbdb6d>:0
at Microsoft.EntityFrameworkCore.Tools.Program.Main (System.String[] args) [0x0002e] in <27660142d7fa4f02b91c8d5e3bfbdb6d>:0
Cannot find 'Mono.SystemDependencyProvider, System' dependency
如果有人知道答案,谢谢!
【问题讨论】: