在MacOS 10.15中,不能使用effirst(3.0)的dbfirst生成db模型

问题描述 投票:0回答:1

mac os 10.15是否有可能不再支持32位,但是当我尝试生成db模型(dbfirst)文件时,因为它使用32位程序?

以下称赞:

% dotnet ef dbcontext scaffold "server=localhost;uid=root;pwd=xxxxxxxx;port=3306;database=xxxxxx;" MySql.Data.EntityFrameworkCore -o Models -f

System.ComponentModel.Win32Exception (2): No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at Microsoft.EntityFrameworkCore.Tools.Exe.Run(String executable, IReadOnlyList`1 args, String workingDirectory, Boolean interceptOutput)
   at Microsoft.EntityFrameworkCore.Tools.Project.FromFile(String file, String buildExtensionsDir, String framework, String configuration, String runtime)
   at Microsoft.EntityFrameworkCore.Tools.RootCommand.Execute()
   at Microsoft.EntityFrameworkCore.Tools.Commands.CommandBase.<>c__DisplayClass0_0.<Configure>b__0()
   at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[] args)
   at Microsoft.EntityFrameworkCore.Tools.Program.Main(String[] args)
No such file or directory
c# visual-studio-code macos-catalina entity-framework-core-3.0
1个回答
0
投票

此版本(3.0.100-preview5-011562中可能已解决此问题>

Win32与32或64位操作系统没有任何关系,但是我明白了您为什么会这么认为。名称可能具有欺骗性。 Win 32是一些异常的包装类。通过它,您可以访问称为NativeError

代码的东西,它是一个32位整数。这就是为什么它被称为win32的原因。 64位操作系统仍可以处理32位int

这是系统异常类,在某些操作出错时使用。这些操作通常涉及系统级调用,例如打开文件或进程

此修复程序是针对权限问题的,而并非此问题,而只是尝试升级.NET Core,看看是否有帮助。

在此处查找问题并提出修复请求

问题:https://github.com/dotnet/cli/issues/11231

修复:https://github.com/dotnet/core-setup/pull/6003

关于您的问题,我怀疑您已升级到64位MACOS,但在此过程中的某个地方,.NET版本32 / 64bit与所拥有的某些软件包之间存在差异。

请删除您的全局nuget,并确保您具有64位.NET和64位二进制文​​件。

© www.soinside.com 2019 - 2024. All rights reserved.