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

Breaking changes to relational command methods may affect Npgsql provider #6783

Closed
divega opened this issue Oct 14, 2016 · 1 comment
Closed
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@divega
Copy link
Contributor

divega commented Oct 14, 2016

Steps to reproduce

  1. Create a .NET Framework console app

  2. Execute install-package Microsoft.EntityframeworkCore.Relational -pre form a feed with recent 1.1.0 preview1 bits

  3. Execute install-package Npgsql.EntityFrameworkCore.PostgreSQL from the NuGet feed.

  4. Add some code that uses the Npgsql provider and build, e.g.:

    using Microsoft.EntityFrameworkCore;
    
    namespace ConsoleApplication86
    {
    class Program
    {
        static void Main(string[] args)
        {
    
        }
    }
    
    public class MyContext: DbContext
    {
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseNpgsql("");
        }
    }
    }
  5. go to the bin\debug or release folder in a developer command prompt and execute ngen install ConsoleApplication86.exe

The issue

The relevant output looks like this:

Warning: System.MissingMethodException: Method not found: 'System.Object Microsoft.EntityFrameworkCore.Storage.IRelationalCommand.ExecuteScalar(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection, System.Collections.Generic.IReadOnlyDictionary`2<System.String,System.Object>, Boolean)'. while resolving 0xa0000a8 - Microsoft.EntityFrameworkCore.Storage.IRelationalCommand.ExecuteScalar.
Warning: System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<System.Object> Microsoft.EntityFrameworkCore.Storage.IRelationalCommand.ExecuteScalarAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection, System.Collections.Generic.IReadOnlyDictionary`2<System.String,System.Object>, Boolean, System.Threading.CancellationToken)'. while resolving 0xa0001da - Microsoft.EntityFrameworkCore.Storage.IRelationalCommand.ExecuteScalarAsync.
Method not found: 'System.Object Microsoft.EntityFrameworkCore.Storage.IRelationalCommand.ExecuteScalar(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection, System.Collections.Generic.IReadOnlyDictionary`2<System.String,System.Object>, Boolean)'. while compiling method NpgsqlDatabaseCreator.HasTables
Method not found: 'System.Threading.Tasks.Task`1<System.Object> Microsoft.EntityFrameworkCore.Storage.IRelationalCommand.ExecuteScalarAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection, System.Collections.Generic.IReadOnlyDictionary`2<System.String,System.Object>, Boolean, System.Threading.CancellationToken)'. while compiling method <HasTablesAsync>d__8.MoveNext

These methods were removed in dbdfe14.

The output is the same for .NET Framework 4.5.1 and 4.6 but I don't know how to do something similar for .NET Core.

Further technical details

EF Core version: 1.1.0-alpha1-22431
Npgsql.EntityFrameworkCore.PostgreSQL version: 1.0.2
Operating system: Windows 10
Visual Studio version: VS 2015 Update 3

@divega divega added this to the 1.1.0-preview1 milestone Oct 14, 2016
@AndriySvyryd AndriySvyryd added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Oct 17, 2016
@AndriySvyryd AndriySvyryd removed their assignment Oct 17, 2016
@AndriySvyryd
Copy link
Member

Fixed in cbc617e

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-bug
Projects
None yet
Development

No branches or pull requests

3 participants