-
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
Support running docfx on .NET Core #138
Comments
What is the current status for runtime support of docfx? Any ETA on coreclr support? I'm trying to run locally on OSX, a |
It's going to take a while to get docfx off of Mono and on to .NET Core. The problem is that docfx has a bunch of 3rd party dependencies that haven't been updated yet to work on .NET Core. However, docfx did recently release a preview that can analyze .NET Core based projects: https://github.com/dotnet/docfx/releases/tag/1.9.0-alpha-0091-g1c1b291. I haven't had a chance to test it out yet though. Note that we are moving everything (including docfx) off of DNX. |
Oh interesting, I didn't realize about the move from |
Yeah, moving off of DNX is a pretty big change for the product. The good news is that you no longer need to install DNX - docfx is now just a native executable. |
Is there any update on this? DocFx seems to have almost ditched the xplat story:
Is there still plans to make this tool cross-platform? It was a big reason I chose it and at this point I'm looking at alternatives as support for .NET Core/xplat seems to still be a long way off. |
Hi @agc93 Migrating to net core is in our backlog however not yet with the highest priority. Currently |
@vicancy I'm currently building a .NET Core app on Linux and DocFX is the only thing that needs Mono: the app, build scripts, dependencies and server all run just fine on .NET Core natively, no Mono needed. Additionally, I can't CI build most of my projects as my CI environment doesn't include Mono (again .NET Core projects don't need it). While I think using
|
@agc93 thanks for your feedback. Yes, I totally agree with you that .NET Core is a meaningful approach. We will investigate the effort migrating to .NET core. We have some 3rd party dependencies not supporting that, e.g. Microsoft.Owin, so it may take some effort to get rid of those dependencies. |
@vicancy looks like owin is only used for docfx serve -- could just as easily use asp.net core with the static files middleware -- are there any other dependencies off the top of your head that need to be migrated? I'd be happy to contribute where needed -- this would make xplat much, much easier. |
@fritz-build One big change is our plugin system which uses another AppDomain. https://github.com/dotnet/docfx/blob/dev/src/docfx/SubCommands/BuildCommand.cs#L517 Honestly speaking, our team does not have enough resource currently to look into xplatform issues, It would be fantastic if you could contribute. We are eager for contributions and just let me know if I can do anything to help. From owin to asp.net core can be the first step out moving to netcore. |
Hey @vicancy i was logged in as @fritz-build by accident when I posted last. I’ll create an issue to convert to asp.net core and create an associated PR sometime this week. I appreciate that resources are limited; just thought that baby steps could go a long way. |
I imagine that effort to move this to .NET Core 2.0 will require less work considering that you can use most of the full .NET Framework dependencies and API surface are of .NET Standard is much larger. |
@vicancy for example, AppDomain is part of .NET Standard 2.0 now: https://docs.microsoft.com/en-gb/dotnet/api/?view=netstandard-2.0&term=appdomain |
You can't create app domains though. |
@davidfowl I am confused 😕 It says you can here: https://docs.microsoft.com/en-gb/dotnet/api/system.appdomain?view=netstandard-2.0 Am I looking at the wrong place? |
It would be off topic to ask why that API is on .NET Standard at the first place. So, I will find a better place to do it. |
@davidfowl thx! Created dotnet/standard#456 |
I know I'm a little late to this party, but I'd like to add my vote for moving to .NET Core (or at least .NET Standard) at some point. I've been looking into redoing my DocFX extension to use an LSP language service for DocFX written in managed code (so I can reuse the DocFX engine libraries), but have been kinda blocked for a while now by the fact that some of those libraries have dependencies that aren't fully compatible with .NET Standard (not even 2.0). I could make a Windows-only language service but that sounds like no fun at all :-) As for I'm willing to put my hand up to spend some time / effort on helping migrate DocFX to .NET Standard / .NET Core (or work with anyone else if there are other volunteers). |
#1963 to track the work items |
Thank you @tintoy It would be great if you can give a hand on this issue. |
Im 100% down. Let me know how I can help. Any guidance on how I can do so would be greatly appreciated. |
Wow, OK, yak-shaving time. There is no Mustache implementation currently compatible with .NET Standard (any version!). Looks like I'll have to create a .NET Standard port of Nustache (or similar). Anyone who'd like to help - now's the time to pitch in :) |
Actually, let me see if it'll still run on .NET Standard 2.0 first (I get the usual |
@tintoy Not strictly Mustache, but Handlebars.Net supports .NET Standard as a starting point |
Any updates on v3? It makes me sad that there's still no docfx release running on .NET Core :( |
@jskeet On the way but not ready for public use now... See https://github.com/dotnet/docfx/blob/v3/docs/roadmap.md |
@superyyrrzz wrt dotnet Core |
@AndyPook It is not mentioned in the roadmap, but v3 starts from .NET Core, and will always support it. |
@superyyrrzz ok thanks for that. Is there a expected timeframe? I get limited resources etc 😄 not looking for a date, just a guide, weeks, months ? My current solution is that I've created a docker base image with the mono etc deps installed and a separate CI step with a volume mount ... |
@AndyPook Not within 2019. We do not determine the exact date, but possible in 2020. I think there is some existing docfx image on docker hub that can make your work easier. |
Any timeline update on this? docfx is an important part of the .NET ecosystem and is used by many OSS projects out there - keeping this a modern, functional building block is really important. |
@roji There are two key pieces missing for the initial v3 community release: a community template and exposing the .NET API reference build. We've just started prototyping the community template here and will likely look at .NET API reference after that. Hopefully some early preview releases will come this calendar year. |
I tried DocFX 3.0.0-beta1.246+8b9773b7f0 and https://github.com/docascode/default-template 1e3e3a9b33f2a1dfd5653efd4dac85b7e8125439 on a document tree that contains only Markdown documents, no .NET API. Installed as a .NET local tool on Windows. Found problems:
|
From #8279 (comment):
Is that only for CompilationUtility.GetNetFrameworkMetadataReferences, which tries to locate mscorlib.dll and System.dll? Perhaps the Microsoft.NETFramework.ReferenceAssemblies NuGet package could be used instead. |
Right, that is one reason. The other reason is the referenced assembly list to build DLLs is incomplete (only
|
For generating docs from DLL files, I think the caller of Is there a scenario in which |
|
The v2.60.0 release now runs on .NET Core. |
A huge thanks @yufeih - I've just switched to running the tool with .NET Core, and everything seems to work just fine! Really nice to get rid of .NET Framework! |
Today docfx runs on the full .NET Framework (and Mono). We should update docfx to run on .NET Core, as this will be the support xplat story for .NET console applications. Obviously this means working with the authors of the many third party dependencies that docfx has to get them onto .NET Core as well.
@blackdwarf
The text was updated successfully, but these errors were encountered: