Multi Targetting Seems to have stopped working as workaround
See original GitHub issueI have many times successfully created a DGML with a non-executable project by multi-targeting the project. For example, I would change a project that was originally targetting .NETStandard2.0 to:
<TargetFrameworks>netcoreapp3.0;netstandard2.0</TargetFrameworks>
Now (possibly result of a VS2019 update???) creating the DGML fails with a message that Microsoft.EntityFrameworkCore.dll cannot be found in the appliations’s bin/debug path. Example with my long path:
System.Exception: Unable to find Microsoft.EntityFrameworkCore.dll in folder C:\Users\jlerm\Downloads\getting-started-entity-framework-core\04\demos\M4 Relationships After\SamuraiApp\SamuraiApp.Data\bin\Debug\netcoreapp3.0.
at EFCorePowerTools.Handlers.ProcessLauncher.GetEfCoreVersion(String folder) in C:\projects\efcorepowertools\src\GUI\EFCorePowerTools\Handlers\ProcessLauncher.cs:line 222
at EFCorePowerTools.Handlers.ProcessLauncher.DropNetCoreFiles(String outputPath) in C:\projects\efcorepowertools\src\GUI\EFCorePowerTools\Handlers\ProcessLauncher.cs:line 244
at EFCorePowerTools.Handlers.ProcessLauncher.GetOutput(String outputPath, String projectPath, GenerationType generationType, String contextName, String migrationIdentifier, String nameSpace) in C:\projects\efcorepowertools\src\GUI\EFCorePowerTools\Handlers\ProcessLauncher.cs:line 64
at EFCorePowerTools.Handlers.ModelAnalyzerHandler.Generate(String outputPath, Project project, GenerationType generationType) in C:\projects\efcorepowertools\src\GUI\EFCorePowerTools\Handlers\ModelAnalyzerHandler.cs:line 67
I can follow Karl Shifflet’s workaround (https://github.com/ErikEJ/EFCorePowerTools/issues/451) successfully, however I cannot understand why multi-targeting is no longer working. I am using a project on the same computer that I have successfully created the dgml with many times. This seems to be the problem a number of people following my EF Core course are hitting.
##Repro Repo https://github.com/julielerman/Demo-Solution-Set-up-for-EF-Core-Power-Tools-Testing
Further technical details
EF Core Power Tools version: 2.4.212 (must have auto updated just today)
Database engine: SQL Server Localdb
Visual Studio version: VS 2019 16.7.2
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
Will let you know tomorrow if it is an easy fix - one possibility is to disable support for EF Core 5 for now.
I will be crossing my fingers. I don’t want to make your life harder.