Quantcast
Channel: MySQL Forums - MySQL for Visual Studio
Viewing all articles
Browse latest Browse all 417

Visual Studio 2019, MySql, EntityFramework 6.4 and error 'Type X is not defined' (no replies)

$
0
0
I have the problem with use declared entity in Visual Studio 2019.

My project:

- in Visual Studio 2019:
- MySQL Installer on Windows 1.4 with
- MySQL for Visual Studio 1.2.9
- Connector/NET 8.0.20

I have new project -> Windows Forms App in Visual Basic
- .NET Framework 4.8
- NuGet Packet EntityFramework v6.4.0
- NuGet Packet MySql.Data v 8.0.20
- NuGet Packet MySql.Data.EntityFramework v 8.0.20

How is created:
1. Add-> New Item -> ADO.NET Entity Data Model -> Add
2. EF Designer from database -> Next
3. New Connection -> MySQL Data Base ->Ok -> Server name, User name Password -> Connected
4. Save connection settings in AppConfig as: New1Entities -> Next
5. Model NameSpace: New1Model -> Finish
Everything was created (.edmx, diagram) and I see my database in model.


But then I go to Form1.vb and write a line:
"Dim Db as New New1Entities "
I have the error: Type 'New1Entities' is not defined. Rebuild Solution not helping. The same situation I have in C#.

Viewing all articles
Browse latest Browse all 417

Trending Articles



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