You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to scaffold when having x64 and x86 .NET Core SDKs installed #95
Your .Net SDK however (if my suspicion is correct) is where the problem lies. Can you confirm whether you have the x64 or x86 version of .Net?
You can use the following command to get that info: dotnet --info
My guess is that you have the x64 SDK installed. To do the scaffolding the dotnet.exe needs to load your assembly to use it. As it is 2 different platforms (x64 vs x86) it can't load.
To fix, manually download and install the x86 SDK. Then edit your PATH environment variable (or however else you want to do it) so that the x86 SDK is picked before the x64 version
So the following PowerShell command should work for you:
&'C:\Program Files (x86)\dotnet\dotnet.exe' ef dbcontext scaffold "connection_string"--your-other-options
Another option is to install the Microsoft Access Database Engine 2010 Redistributable in its x64 version (which is the last release that still supports Access 97 Jet databases) and then use either its new ODBC or OLE DB provider.
Activity
lauxjpn commentedon Dec 23, 2020
Your project file looks fine.
Your .Net SDK however (if my suspicion is correct) is where the problem lies. Can you confirm whether you have the x64 or x86 version of .Net?
You can use the following command to get that info:
dotnet --infoMy guess is that you have the x64 SDK installed. To do the scaffolding the dotnet.exe needs to load your assembly to use it. As it is 2 different platforms (x64 vs x86) it can't load.
To fix, manually download and install the x86 SDK. Then edit your PATH environment variable (or however else you want to do it) so that the x86 SDK is picked before the x64 version
Originally posted by @ChrisJollyAU in #34 (comment)
lauxjpn commentedon Dec 23, 2020
Thanks @ChrisJollyAU , following your steps worked.
Is there another technical way to run both x86 and x64 SDKs without going back and forth to set their priority order in PATH?
Originally posted by @olakusibe in #34 (comment)
lauxjpn commentedon Dec 23, 2020
Haven't tried anything but https://stackoverflow.com/questions/39497807/configure-net-core-to-use-x86-sdk has a couple of potential solutions. I think the
Dicretory.Build.Targetsfile may have more chance of successOriginally posted by @ChrisJollyAU in #34 (comment)
lauxjpn commentedon Dec 23, 2020
@olakusibe A simple way is to just use appropriate full path to the x86 or x64
dotnet.exein your CLI command:So the following PowerShell command should work for you:
Another option is to install the Microsoft Access Database Engine 2010 Redistributable in its x64 version (which is the last release that still supports Access 97 Jet databases) and then use either its new ODBC or OLE DB provider.