Skip to content

"Microsoft.AspNetCore.Mvc.ViewFeatures.Internal" can not find in dotnet core 3.0.0-preview7-27912-14 #12643

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

Closed
Benknightdark opened this issue Jul 27, 2019 · 4 comments
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates question

Comments

@Benknightdark
Copy link

After I upgrade my dotnet core 2.2 MVC application to 3.0.0-preview7-27912-14, my custom razor html extesion can not find "Microsoft.AspNetCore.Mvc.ViewFeatures.Internal".

image

And, after "Microsoft.AspNetCore.Mvc.ViewFeatures.Internal" can not find , here is some function I can not use , such as ExpressionHelper and ExpressionMetadataProvider.

image

Here is my example github url : https://github.com/Benknightdark/dotnetcore3v7

@davidfowl
Copy link
Member

We've moved all pubternal APIs to be truly internal. #4932

You'll need to copy that code over to your project from MVC.

cc @pranavkm @rynowak

@rynowak
Copy link
Member

rynowak commented Jul 27, 2019

@pranavkm - did we create a public version of these APIs?

@rynowak rynowak added area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates question labels Jul 27, 2019
@pranavkm
Copy link
Contributor

From #8678 (comment)

We addressed this particular gap as part of aspnet/Mvc#8724. 3.0 offers a ModelExpressionProvider type that's available from DI and combines the 3 APIs that were previously available:

  • ModelExpressionProvider.GetExpressionText<TModel, TValue>(Expression<Func<TModel, TValue>>)
  • ModelExpressionProvider.CreateModelExpression<TModel, TValue>(ViewDataDictionary<TModel>, string expression)
  • ModelExpressionProvider.CreateModelExpression<TModel, TValue>(ViewDataDictionary<TModel>, Expression<Func<TModel, TValue>> expression)

The latter two return an instance of ModelExpression which is a superset for ModelExplorer that ExpressionMetadataProvider returns. aspnet/Mvc#8724 (comment) has a suggestion for libraries that need to support different versions of AspNetCore.

@Benknightdark
Copy link
Author

OK, thanks for your help

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates question
Projects
None yet
Development

No branches or pull requests

5 participants