When updating my application from core 2.2 to net 7 it shows me this error RZ1007 "namespace" is a reserved word and cannot be used in implicit expressions. An explicit expression ("@()") must be used.

BF 20 Reputation points
2023-03-10T13:41:21.6533333+00:00

When updating my application from core 2.2 to net 7, it shows me this error RZ1007, I already uninstalled the "Microsoft.AspNetCore.MVC" package and it keeps showing me the same error

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,400 questions
{count} votes

Accepted answer
  1. Zhi Lv - MSFT 32,106 Reputation points Microsoft Vendor
    2023-03-14T07:07:14.35+00:00

    Hi @BF

    the error is generated in the part of @namespace @namespace prjproyec.Areas.Identity.Pages

    To add the namespace reference, you could try to change the code as below:

    @using prjproyec.Areas.Identity.Pages
    

    Best regards,
    Dillion

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. BF 20 Reputation points
    2023-03-13T13:41:15.6766667+00:00

    the error is generated in the part of @namespace

    @namespace prjproyec.Areas.Identity.Pages