efcore/EFCore.FSharp

Namespace or module "EntityFrameworkCore" is not defined.

Closed this issue · 4 comments

Thank you for your work first of all.

Describe the bug
«Namespace or module "EntityFrameworkCore" is not defined.»

To Reproduce
Steps to reproduce the behavior:

  1. Follow this guide and create F# console app.
  2. Add EntityFrameworkCore.FSharp.
  3. Try to open EntityFrameworkCore.FSharp in any module.

Expected behavior
There will be an error message «Namespace or module "EntityFrameworkCore" is not defined.»

Desktop (please complete the following information):

  • OS: Windows 10 and Ubuntu Server 20.04.02

Additional context
I tested this behaviour first in Visual Studio Code on Ubuntu Server using Remote extension and Ionide, then in Visual Studio Community 2019 on Windows. Building project gives the same error. This happens although there is a reference to package in project dependecies. Using another versions of package doesn't help. Unloading project, restarting and reinstalling Visual Studio doesn't help either.

Hey, @Reenuay. I fixed this by modifying the .fsproj file. When adding the package (nuget) and specifying the version number, some additional information is added to the package reference in the .fsproj file. By removing the include assets and private assets tags, if there are any, fixed the problem for me. I do not know why. :)

Hey, @SimenLK! Thank you for your answer! It really solved the issue. I don't understand why either X)

Thanks for answering this @SimenLK!
And thank you for raising it @Reenuay

I'll take a look and see why these tags are being added to the fsproj file

Resolved in package 5.0.3-beta006