Closed psantos10 closed 1 year ago
@psantos10 Can you post your csproj file(s)?
@psantos10 Can you post your csproj file(s)?
@ajcvickers
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.1" />
</ItemGroup>
</Project>
I will try this out on mac this afternoon.
I am not able repro this. It generates entity/db context files correctly for me. One possible issue could be, you are passing the databaes file name using file path. Does the file exist in right location? I put the db file in same directory as csproj file and used "FileName=Northwind.db" as connection string.
I am not able repro this. It generates entity/db context files correctly for me. One possible issue could be, you are passing the databaes file name using file path. Does the file exist in right location? I put the db file in same directory as csproj file and used "FileName=Northwind.db" as connection string.
Yes, the file exists. Creating Entity/db Context files manually, I can retrieve the data from Database, I can do a CRUD.
Actually, right now, I am using the project, But I had to create the entities/db context manually.
@psantos10 I don't think there is anything else we can do here without being able to reproduce the issue.
EF Team Triage: Closing this issue as the requested additional details have not been provided and we have been unable to reproduce it.
BTW this is a canned response and may have info or details that do not directly apply to this particular issue. While we'd like to spend the time to uniquely address every incoming issue, we get a lot traffic on the EF projects and that is not practical. To ensure we maximize the time we have to work on fixing bugs, implementing new features, etc. we use canned responses for common triage decisions.
Description
1- On MacOS Big Sur v 11.0.1, using VS Code, I created a classlib project. Into that project, I referenced two packages:
2- I generated a SQLite Database (Northwind.db):
Northwind.db.zip
3- I run the following command to generate the Entity Classes:
Few seconds later I get this ouput:
Expectation:
I was expected the Entity class files to be generated. But not file is created.
Include verbose output
dotnet ef dbcontext scaffold "Filename=../Northwind.db" Microsoft.EntityFrameworkCore.Sqlite --namespace Packt.Shared --data-annotations --context Northwind --verbose
Include provider and version information
EF Core version: 5.0.1 Database provider: (e.g. Microsoft.EntityFrameworkCore.Sqlite) Target framework: (e.g. .NET 5.0) Operating system: MacOS Big Sur v 11.0.1 IDE: Visual Studio Code 1.52.2
dotnet --info: