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

Codegen is generating code for AspNetCore types #3786

Closed
galvesribeiro opened this issue Dec 12, 2017 · 4 comments
Closed

Codegen is generating code for AspNetCore types #3786

galvesribeiro opened this issue Dec 12, 2017 · 4 comments
Assignees
Milestone

Comments

@galvesribeiro
Copy link
Member

galvesribeiro commented Dec 12, 2017

After update to beta2 today, one of my projects fail to build because codegen is generating code for some AspNet types.

image

I tried to remove obj/ and bin/ and rebuild but got the same problem.

It may be related to #3771

@sergeybykov sergeybykov added this to the 2.0.0 milestone Dec 12, 2017
@ReubenBond
Copy link
Member

ReubenBond commented Dec 12, 2017

@galvesribeiro could you give me a build log where your csproj has <OrleansCodeGenLogLevel>Trace</OrleansCodeGenLogLevel> set?

@galvesribeiro
Copy link
Member Author

Sent on Gitter @ReubenBond.

@ReubenBond
Copy link
Member

Thanks @galvesribeiro. I see the issue and I'll try to fix it today.

Issue is that our 'backing field to auto property' heuristic is not checking for an exact type match between field and property, so when the subclass overrides a base property (public new string Prop), it may have a type mismatch. See the MVC ControllerContext code here: https://github.com/aspnet/Mvc/blob/7e26af908ef068407961479d21539079f5ffadfb/src/Microsoft.AspNetCore.Mvc.Core/ControllerContext.cs#L47

Meanwhile, this should be alleviated with the fix for #3771.

@galvesribeiro
Copy link
Member Author

Thanks @ReubenBond! Looking forward to get the updated packages.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants