Error: “Interface name is not valid at this point”

If you ever get the Visual Studio error:  “Interface name is not valid at this point”, it’s a simple fix.  You have a simple typo.  See the example here:


container.RegisterType<IUser, User);

Notice the closing parenthesis?  There’s no open parenthesis.  Notice the open angled bracket?  There’s no closing angled bracket.
Once you see that, the fix is obvious:  Replace the “)” with “>()”.

Thank you for sharing this article.  See this image?


You’ll find actual working versions of them at the top and bottom of this article. Please click the appropriate buttons in it to let your friends know about this article.