Skip to content

"Empty" errors in MVC Controller #45178

@ralfbalzer

Description

@ralfbalzer

I upgraded my Project to .Net 7.0.
Since then, the debugger and building the solution, raises an error on assigning "Empty" to a string in an MVC Controller.

It raises the error "cannot convert source type to 'Microsoft.AsoNetCore.Mvc.EmptyResult' to target type 'string' "

Using "string.Empty" works fine.

Screenshot 2022-11-16 202238
Screenshot 2022-11-16 202704

Metadata

Metadata

Assignees

No one assigned

    Labels

    old-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions