Ef6: Updating large models from database can make sp_executesql fail with too many parameters

Created on 26 Jan 2017  路  12Comments  路  Source: dotnet/ef6

https://github.com/aspnet/EntityFramework6/pull/41 very ingeniously fixes issues with large models by consolidating parameters of schema discovery queries that contain the same values.

I have observed a few issues with it though:

  1. Modifications and additional public surface on runtime pieces like EntityClient seem unnecessary
  2. We would need to verify that this works with third party providers:

    • SQL Server is the only provider for which we know 100% the fix is needed

    • Any provider that implements schema discovery by faking the execution of schema discovery queries may have a hard dependency with the position of the parameters in the parameter collection

area-tools closed-fixed type-bug

Most helpful comment

I see this made it to the latest VS 2017 (v15.7) release!
Excellent 馃榾

Thanks for getting it shipped - I appreciate it's not easy to swap in new tools versions in such a massive product.

(see https://docs.microsoft.com/en-au/visualstudio/releasenotes/vs2017-relnotes#EFTools )

All 12 comments

@bengutt @IanYates Assuming you have been able to build the EF Tools from source, it would be great if you could do a quick validation that the reworked version of the fix works for you.

My VS2015 installation is dead and I need to update a model today. Back to the source, build and see if I can shoehorn into 2017... I'll let you know.

Success.
I did a fresh fetch of master, opened 2017 dev prompt and built EF and the tools. A lot of the tests in the EF build failed...
I then overwrote these files in progX86\Microsoft Visual Studio\2017\Enterprise\Common7\IDE

image

I'm now able to update my model. Thank you again! 馃檶

I briefly tried the build in the 2015 dev prompt but that failed due to .NET 4.6 targeting in one or more of the projects. No big deal for me but it might be worth mentioning in your docs that 2017 seems to be the minimum (or perhaps at least a targeting pack being present for older VS versions)

Is this present in the new VS 2017 Update 3 (VS 15.3) release that came out this week?

I am facing issue in new VS 2017 15.4.5. What exactly needs to be done to apply this fix?

I think you need to wait for updated tools for VS 2017, or install the EF 6.2 beta tools in VS 2015 (for example the free Community edition), and run the design process there.

@ErikEJ Are the VS2017 tools an 'extension' (as most of VS2017 is now) or are they part of the main application? E.g. Is it possible to get out of band updates vs. the VS2017 release schedule and possibly install pre-release/beta versions?

I would expect them to be an VSIX (extension) yes - but not sure about out of band options.

@CZEMacLeod To get the 6.2 bits installed with VS 2017, you could install the 6.2 beta tools:
https://www.microsoft.com/en-us/download/details.aspx?id=55259
and then copy the relevant dll files into your VS 2017 install, as described above: https://github.com/aspnet/EntityFramework6/issues/185#issuecomment-295048960

@divega : We need the EF 6.2 Tools for VS 2017 very soon!

Thank you Erik but just copying does not seem to be working. I ended up getting The 'Microsoft.Data.Entity.Design.Package.MicrosoftDataEntityDesignPackage' package did not load correctly. error and EDMX file has stopped opening. I am definitely doing something wrong here! I am not sure it is Ok to discuss issue I am facing so let me know if there are any detailed instructions available elsewhere. Thank you!

I see this made it to the latest VS 2017 (v15.7) release!
Excellent 馃榾

Thanks for getting it shipped - I appreciate it's not easy to swap in new tools versions in such a massive product.

(see https://docs.microsoft.com/en-au/visualstudio/releasenotes/vs2017-relnotes#EFTools )

Thanks to you and sorry it took so long :blush: @bengutt鈥檚 PR is one of the most impactful contributions we have had on the designer.

Was this page helpful?
0 / 5 - 0 ratings