ASP.NET vNext class library, linq not available?

I am using linq expression in asp.net vNext class library. Errors are not showing in the editor, but when I try to build I see the following message: Could not find an implementation of the query pattern for source type 'IEnumerable<T>'. 'Select' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'? FitLog.Domain.ASP.NET Core 5.0

I have a using statement for System.Linq, so I'm not sure what's going on.

Refresh

Here's my project.json:

{
  "version": "1.0.0-*",
  "dependencies": {
  },

  "frameworks" : {
      "aspnet50" : { 
          "dependencies": {
          }
      },
      "aspnetcore50" : { 
          "dependencies": {
              "System.Runtime": "4.0.20-*"
          }
      }
  }
}

      

+3


source to share


1 answer


For the purpose, aspnetcore50

you need to add a dependency for System.Linq

(you will see it appear in Intellisense in the file project.json

).



+6


source







All Articles