.net Core 2.1.x EntityFramework | DatabaseGeneratedAttribute annotations could not be found

.net entity-framework-core

Question

For my application, I'm attempting to utilize the.Net Entity Framework Core. Relevant quotes from.csproj files are as follows:

<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.0" PrivateAssets="All"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.0"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.0"/>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.0"/>

I use the annotations mentioned in this instruction in my entity classes. But my build keeps failing with mistakes like:

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

I have added the "using" lines to the code that are required. The problem still appears to be there. Any advice on what to look for or recommendations on how to fix this problem would be highly appreciated.

On macOS, I'm using VS Code for development.

I appreciate it.

1
1
6/7/2018 4:48:37 AM

Popular Answer

ZZZ_tmp
1
6/7/2018 4:57:39 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow