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

Migrations: Support x64 assemblies in package manager console commands #1074

Closed
bricelam opened this issue Nov 17, 2014 · 10 comments
Closed
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@bricelam
Copy link
Contributor

This is a sub-issue of #1058.

One idea I had was to try and use a compatible platform (x86 or AnyCPU) if present, and give a nice error message if one isn't available.

@rowanmiller rowanmiller added this to the 1.0.0-rc1 milestone Nov 17, 2014
@rowanmiller rowanmiller modified the milestones: 7.0.0-rc1, 7.0.0 Nov 25, 2014
@bricelam bricelam changed the title Migration commands don't work with x64 assemblies Commands: Support x64 Assemblies Dec 6, 2014
@bricelam bricelam added pri1 and removed pri1 labels Jul 1, 2015
@bricelam bricelam changed the title Commands: Support x64 Assemblies NuGet Commands: Support x64 Assemblies Sep 15, 2015
@rowanmiller rowanmiller changed the title NuGet Commands: Support x64 Assemblies Migrations: Support x64 Assemblies in package manager console commands Dec 8, 2015
@rowanmiller rowanmiller changed the title Migrations: Support x64 Assemblies in package manager console commands Migrations: Support x64 assemblies in package manager console commands Dec 8, 2015
@rowanmiller rowanmiller modified the milestones: Backlog, 7.0.0 Dec 8, 2015
@vmsgsp
Copy link

vmsgsp commented Jun 30, 2016

Are there any plans when the Entity Framework Commands (Add-Migration, etc.) will be available for x64 Assemblies as well? We are deprecating 32bit builds and it is not nice being forced to continue with 32bit support just because tools don't support 64 bit.
Therefore, as an alternative to the Package Manger Console scripts of Entity Framework Commands, I am using the Microsoft.Data.Entity.Design.MigrationsOperations class in a C# console application in order to generate my migrations. This works quiet well, except that I also have to mimic the behavior of adding the generated files to the csharp project file (using EnvDTE automation for this, which seems to be deprecated with Visual Studio 2015).
Maybe you could enhance the Microsoft.Data.Entity.Design.MigrationsOperations so that it adds the generated files to the project file (and removes in case of Remove-Migration)?
The big advantage I see with this C# console application approach is that we can debug our model builders when being called by the Entity Framework Commands (which is not that easy when running Package Manager Console Scripts).

@bricelam
Copy link
Contributor Author

bricelam commented Jul 1, 2016

@vmsgsp Yes, the current plan (for #5334) is to execute commands out-of-process which will enable x64 project configurations to work.

@vmsgsp
Copy link

vmsgsp commented Jul 1, 2016

@bricelam Will this x64 support also be implemented for Full .NET (EF7, .NET 4.6)? In #5334 there is only the keyword ".NET Core".

@bricelam
Copy link
Contributor Author

bricelam commented Jul 2, 2016

Yes

@bricelam
Copy link
Contributor Author

bricelam commented Aug 12, 2016

We ditched app domains for processes in #6288. This Just Works� now.

@bricelam bricelam modified the milestones: 1.1.0, Backlog Aug 12, 2016
@bricelam bricelam added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Aug 12, 2016
@chandanpednekar
Copy link

chandanpednekar commented May 28, 2018

@bricelam, I am executing add-migration in x64 (on EF 6.2 and .NET 4.7). It fails with BadImageFormatException. I think that is expected (because it's EF 6.2) ?!

@bricelam
Copy link
Contributor Author

Yes, EF6 executes inside the VS process which is 32-bit. EF Core executes out-of-process which enabled us to support 64-bit.

@bricelam
Copy link
Contributor Author

You may be able to make it work by building as AnyCPU (without Prefer 32-bit)

@chandanpednekar
Copy link

@bricelam Thanks for the confirmation. So, can I upgrade to EF core while still being on .NET 4.7 ? Is that possible?

@bricelam
Copy link
Contributor Author

bricelam commented May 29, 2018

Yes, EF Core works on any .NET Standard 2.0 compatible framework including .NET Framework 4.6.1+

@ajcvickers ajcvickers modified the milestones: 1.1.0-preview1, 1.1.0 Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

No branches or pull requests

6 participants