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

JsonResult has moved to the Microsoft.AspNetCore.Mvc.Core assembly #389

rynowak opened this issue Sep 20, 2019 · 1 comment


Copy link

@rynowak rynowak commented Sep 20, 2019

JsonResult has moved to the Microsoft.AspNetCore.Mvc.Core assembly

JsonResult has moved to the Microsoft.AspNetCore.Mvc.Core assembly. This type used to be defined in Microsoft.AspNetCore.Mvc.Formatters.Json. While we have added [TypeForward(...)] that will address this issue for the majority of users, applications that use 3rd party libraries may encounter issues.

Libraries that were compiled against the 2.2 version of Microsoft.AspNetCore.Mvc.Formatters.Json may need to recompile in order to address the problem for all user.

Version introduced

3.0-preview 6

Old behavior

Application using a 2.2-based library could be built.

New behavior

Application fails compilation with an error like:

The type 'JsonResult' exists in both 'Microsoft.AspNetCore.Mvc.Core, Version=, Culture=neutral, PublicKeyToken=adb9793829ddae60' and 'Microsoft.AspNetCore.Mvc.Formatters.Json, Version=, Culture=neutral, PublicKeyToken=adb9793829ddae60'

Reason for change

This is part of platform-level changes to the composition of ASP.NET Core as described here: #325

Recommended action

Contact the library author and ask them to recompile the library targeting ASP.NET Core 3.0.



Affected APIs


Issue metadata

  • Issue type: breaking-change
@rynowak rynowak added this to the 3.0.0-preview6 milestone Sep 20, 2019
@aspnet aspnet locked as resolved and limited conversation to collaborators Sep 20, 2019

This comment has been minimized.

Copy link
Member Author

@rynowak rynowak commented Sep 20, 2019

Please use aspnet/AspNetCore#14176 for discussion of this topic.

This change occurred a while ago (preview-6). We're calling it out separately to make this problem easier to find.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
1 participant
You can’t perform that action at this time.