-
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
Scaffold-DbContext does not emit warning messages for failed entity generation #7315
Comments
With build 15.0.0+26222.1.d15rel I no longer see the precise issue above i.e. the generated |
I am frustrated by the fact it simply returns "Build failed." with no further information on how to diagnose the issue that caused the failure. |
@markti If you're hitting that, the compilation errors should be listed in Visual Studio's Error List tool window. |
Marking for re-triage. This (not showing log messages during Scaffold-DbContext) is a good candidate for 1.1.2. |
This patch fix is approved. Please follow the normal code review / pull request process and make sure you make the change in the correct branch. |
Change is already checked in to rel/1.1.2 (see above) - no further work. |
Preview builds of this patch fix should be available on the following feeds:
If you have a chance, please try out these preview builds and let us know if you have any feedback! |
Yes, it works in aspnet-1-1-2-may2017-patch-public |
If table contains columns with UDDT, it can't be exported and there is no log information why.
Steps to reproduce
Install Visual Studio 2017 RC1.
Install MSSQL Server Express 2016.
Create schema Users or remove it from code.
In DB create simple UDDT:
CREATE TYPE [Users].[UserName] FROM [nvarchar](20) NOT NULL
And create simple table:
CREATE TABLE [Users].[Users]( [UserId] [int] IDENTITY(1,1) NOT NULL, [UserName] [Users].[UserName] NOT NULL, CONSTRAINT [PK_Users.Users:UserId] PRIMARY KEY CLUSTERED ( [UserId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [UsersData] ) ON [UsersData]
Next in VS2017RC1 command line:
Scaffold-DbContext "Server=localhost\SQLEXPRESS; Database=SimpleDB; User Id=Test; Password=Test; MultipleActiveResultSets=true;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Data\Models\Users -Schema Users -Force -Verbose
After this, we will receive:
Where is column UserName?! And this for all UDDT.
Key -Verbose in command parameters, but nothing output about this. If your table contains all columns with UDDT - you will receive empty log and simple string
// Unable to generate entity type for table 'Users.Users'. Please see the warning messages.
in Context.csIt mean - there is no any info\warnings\errors (it mean ok - isn't it?) in command line with -Verbose key, but receive full zero in code.
Further technical details
The text was updated successfully, but these errors were encountered: