Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

The type or namespace name 'DbContext' could not be found in NetStandard Class

$
0
0

Visual Studio 2017.

I create a separate Class Library (.Net Standard) Project. Go to Manage NuGet Packages and look for Entity Framework, find it and install it (6.4). Add a class to this project with the below code

public class StoreContext : DbContext
{
}

Error: The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?)

I add using System.Data.Entity;

I now get The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)

I then decide to try and add System.Data but when i go into the references option, under assemblies i see

no framework assemblies were found on this machine

What am i missing?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>