title: The current CSharpHelper cannot scaffold literals of type 'System.Func`3
body: <p>.Net Core dependencies compatibility is a nightmare! I've been on this error for a couple of days now.</p>
  
  <p>Basically, I followed <a href="http://www.michael-whelan.net/ef-core-101-migrations-in-separate-assembly/" rel="nofollow noreferrer">this guide</a> to create .net core class library. I adopted project.json file from the sample app and added a few more dependencies at the end. While the sample app generated the migration successfully, the app I'm working on failed with the following error:</p>
  
  <blockquote>
    <p>The current CSharpHelper cannot scaffold literals of type 'System.Func`3[Microsoft.EntityFrameworkCore.Metadata.IProperty,Microsoft.EntityFrameworkCore.Metadata.IEntityType,Microsoft.EntityFrameworkCore.ValueGeneration.ValueGenerator]'. Configure your services to use one that can.</p>
  </blockquote>
  
  <p>This is my project.json file contents:</p>
  
  <pre><code>    {
    "version": "1.0.0-*",
    "buildOptions": {
      "emitEntryPoint": true
    },
    "dependencies": {
      "Microsoft.EntityFrameworkCore.SqlServer": "1.0.1",
      "Microsoft.EntityFrameworkCore.SqlServer.Design": {
        "version": "1.0.1",
        "type": "build"
      },
      "Microsoft.EntityFrameworkCore.Tools": {
        "version": "1.0.0-preview2-final",
        "type": "build"
      },
      "Newtonsoft.Json": "9.0.1",
      "System.Xml.XmlDocument": "4.0.1",
      "System.ComponentModel.Annotations": "4.3.0",
      "SapientGuardian.EntityFrameworkCore.MySql": "7.1.14",
      "Microsoft.AspNetCore.Mvc.ViewFeatures": "1.1.0",
      "Microsoft.AspNetCore.Identity": "1.1.0",
      "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.0"
    },
    "frameworks": {
      "netcoreapp1.0": {
        "dependencies": {
          "Microsoft.NETCore.App": {
            "version": "1.0.1",
            "type": "platform"
          }
        }
      }
    },
    "tools": {
      "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final"
    }
  }
  </code></pre>
  
  <p><a href="https://stackoverflow.com/questions/41176240/ef-core-1-1-migration-the-current-csharphelper-cannot-scaffold-literals-of-typ">A recent and similar issue on stackoverflow</a> would have solved my problem but any attempt to change the above dependencies version to match the given solution results in version incompatibility error with the .net class library app or total failure of the <strong><em>dotnet ef migration</em></strong> command e.g. dotnet-ef not found.</p>
  
  <p>Please, someone point me to what I'm doing wrong here.</p>
  
  <p>Thanks!</p>