-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Powershell Tools 1.1.0-preview4 fails when target >=net452 #7146
Comments
I had the same problem, but when adding a migration instead. In fact every PS command I tried from Package Manager Console ends up with:
It seems to use the Project name instead of StartupProject name when searching for the entry point. I suggest to rename the issue in I don't know if it is connected, but #7071 has a similar problem, but I don't think that workaround will it work even here. |
I'm agree with you, as it seems something generally related to the tools itself. I'm going to try the walkarounds proposed in #7071 using preview3 and las nightly of preview4 and update with results. |
You were right. Trying to use 1.0.0-preview3-final trows the following error:
And using the latests nightly '1.2.0-preview4-22845' gives the same error as using '1.1.0-preview4-final'... |
This is another problem they are fixing on netcore CLI, you have to set the You should try with something like this: Add-Migration CreateDatabase -StartupProject EFCore.AspNetCore.ProdMigration -Project EFCore.AspNetCore.ProdMigration.Data where BTW I've tested the script above using the version
I've created a gist with the simple app to reproduce the problem: https://gist.github.com/micdenny/b23fac112d8607b998e63e3b3adfa402 |
There are a lot of issues with the tooling at the moment (they mostly stem from the complexity of trying to support project.json/xproj and the new MSBuild based tooling - neither of which is a stable release themselves). Two things to try.
I realize this is a big mess, so we are just trying to find workarounds to unblock folks while we stabilize the tooling for the next release. |
Thank you @rowanmiller and your team for the great effort you put on this project. This is a tool in preview so I agree that we have to find workarounds and wait for the next release (msbuild based).
with the dotnet ef command it works, but it is mandatory to reference from the startup project the data library that is quite a common use case.
the rollback to Another workaround is to emit the entrypoint for the data class library, in that way the |
Thank you @micdenny and @rowanmiller for all the workarounds. I've been able to scaffold the database using |
Closing as we have a workaround... these issues are being resolved in future releases of the tools. |
Steps to reproduce
Scaffold-DbContext -Connection "server=<server>;Database=<dbname>;Integrated Security=true" Microsoft.EntityFrameworkCore.SqlServer -Verbose
The issue
Code is not generated and the error shown is:
Further technical details
EF Core version: 1.1
Operating system: Windows 10 14393.447
Visual Studio version: VS2015 Update 3 14.0.25431.01
NuGet Package Manager: 3.5.0.1996 (beta)
The text was updated successfully, but these errors were encountered: