I wanted to integrate a Microsoft Sign-In functionality into my ASP.NET core site. When reading following section in the Microsoft Docs, they suggest to download a preconfigured project which has a bit of configuration done for you.
Link: 
When going over the red lines it points me to CS0116:A namespace cannot directly contain members such as fields or methods.
Does someone know whats going on here or am I just blind?
CodePudding user response:
Namespaces cannot contain dash characters -
The reason the error says
CS0116:A namespace cannot directly contain members such as fields or methods.
Is because of the dashes -, it thinks you are trying to perform a mathematical operation and subtract a variable or object named OpenIDConnect from namespace WebApp, which is not allowed.
You could instead:
- Use a period
.if these are meant to be nested namespaces - Use underscores
_ - TitleCase your namespaces by just removing the dashes
