-
Notifications
You must be signed in to change notification settings - Fork 866
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
DocFX currently only supports generating metadata with namespace defined #417
Comments
@simax it's not a good practice to define types in global namespace. Do you have any classes defined in global namespace? |
No, all classes etc are defined inside namespaces. Its only producing this error for 2 of the 8 projects in the solution. I can't see anything different about those 2. |
I have the same issue. I downloaded DocFx added it to my environment's path. I then per instructions performed the docfx init and docfx --serve. Everything came up but needed additional content. The code I'm trying to include lives in 7 different projects, so I added one of them to the docfx\src folder per instructions. I went back to the command line and ran docfx init (again) and docfx -serve (again). Attempting to serve the file resulted in:
Note I've code commented all the content in that project, and if I use Sandcastle Help File Builder all of the documentation shows up with no issues. The project X.Y.Z has no issues compiling and runnning, it's just when I attempt to document it in docFX where these namespace issues happen. Please advise. |
After a bit of hacking was able to get this to work. Here's the solution for me. Using DocFX to document "other" projects
|
Interesting, my solution is an existing .Net solution and I placed the I then configured my
Although this appears to be a valid configuration as per the docs. It produces the error I described. I don't understand why it only complains about 2 of the 8 projects in the solution. |
Actually the message is not accurate, it actually means there're types under global namespace. I suspect they're compiler generated types. We'll update the code to print out all types under global namespace so that you can get more details about this issue. |
@simax We improved the warning message in dev branch. You can try it to see whether it still generates warning. |
Unfortunately I only have |
then you can wait until our next release which will be available in two weeks. |
When I run
docfx docfx.json --serve
from the command line I get warnings for a couple of projects in my solution.Warning: No namespace is found in assembly XXX. DocFX currently only supports generating metadata with namespace defined.
How do I fix this?
The text was updated successfully, but these errors were encountered: