I upgraded to dotConnect for PostgreSQL Ver. 7.20.1782 and Entity Developer Ver. 6.10.1135. VS2019 Community is Version 16.8.3. My project targets .NET Framework 4.6.2.
Using Entity Developer standalone, the code generation doesn't update the VS2019 project. For example, I can add a class to the model, save the model and run code generation. The C# code file is generated properly, but the VS2019 project doesn't change to include the new code file. If I then delete the class, save the model, and run code generation, the C# file is properly deleted.
If I use VS2019 integrated Entity Developer, everything seems to work fine. I really like using the standalone application, though. I've used it for years and its worked fine until now.
I am using a user template based on DbContext.
How can I get the standalone code generation to update the VS2019 project again?
Generated code not included in VS2019 project
-
- Posts: 10
- Joined: Wed 29 Jun 2016 13:34
Re: Generated code not included in VS2019 project
This question is about VS2019 functionality: you should choose "Add as link" instead of "Add" via the Add > Existing Item menu of Visual Studio.
Refer to https://stackoverflow.com/questions/198 ... pying-them.
Refer to https://stackoverflow.com/questions/198 ... pying-them.
-
- Posts: 10
- Joined: Wed 29 Jun 2016 13:34
Re: Generated code not included in VS2019 project
This doesn't work. I added the .edml to my VS2019 projectas a link, then added a new class to the model (using standalone ED) and ran the code generation. A DbSet<TestClass> gets added to the DbContext, but same as before, the new class TestClass.cs does not get added to the VS2019 project file (so it doesn't appear in the Solution Explorer).
Whatever magic the integrated ED does to insert the new .cs file into the VS project file isn't being done by the standalone ED.
Whatever magic the integrated ED does to insert the new .cs file into the VS project file isn't being done by the standalone ED.
Re: Generated code not included in VS2019 project
You should "Add as link" the generated code files instead of the *.edml model.