Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi Targetting Seems to have stopped working as workaround #508

Closed
julielerman opened this issue Sep 17, 2020 · 8 comments
Closed

Multi Targetting Seems to have stopped working as workaround #508

julielerman opened this issue Sep 17, 2020 · 8 comments

Comments

@julielerman
Copy link

julielerman commented Sep 17, 2020

I 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 (#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

@ErikEJ
Copy link
Owner

ErikEJ commented Sep 17, 2020

Please share a repro project.

@julielerman
Copy link
Author

The link to the repro is in the issue. :)

@julielerman
Copy link
Author

One more note for now:
if I truly turn the class library project into an exe:

<PropertyGroup>
   <TargetFrameworks>netcoreapp3.0;netstandard2.0</TargetFrameworks>
   _<OutputType>Exe</OutputType>_
 </PropertyGroup>

and add a program.cs file, then all of the gazillion dlls DO get pulled into that projects bin/debug folder.

@julielerman
Copy link
Author

updated VS2019 to 16.7.3. No difference.
Ran as admin. No difference.
I fear this might be a change in VS.

@ErikEJ
Copy link
Owner

ErikEJ commented Sep 17, 2020

@julielerman
Copy link
Author

OOOHHHH!!!! Sorry its a bug but hooray! Now I know why people keep having this problem. An easy fix??

@ErikEJ
Copy link
Owner

ErikEJ commented Sep 17, 2020

Will let you know tomorrow if it is an easy fix - one possibility is to disable support for EF Core 5 for now.

@julielerman
Copy link
Author

I will be crossing my fingers. I don't want to make your life harder.

@ErikEJ ErikEJ closed this as completed in 34d407c Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants