-
Notifications
You must be signed in to change notification settings - Fork 860
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 for .NET Core Tooling Preview3+ projects #1254
Comments
Yes, Roslyn should be updated to support it. Currently we are waiting for its official release. |
Seems Roslyn 2.0-rc4 can open new csproj, but fail to extract info from it. |
Is there any work being done on this? VS2017 is just around the corner, and for libraries targeting the latest dotnet version, not being able to use DocFx is a bit of a problem. |
I encountered this today too. I'm using .NET Core SDK 1.0 rc4 build 004771. I created a new project:
Added docfx:
Add nuget reference to
Added
Add a C# class
Build App:
Build docfx:
Add xmlns to
Rebuild App
Rebuild docs
That's as far as I've gotten. |
Looks like Roslyn 2.0-rc4 has made it's way on to the official NuGet feed, any progress on this? |
Any word on a fix for this? |
As a workaround I'm including *.cs files directly now, that seems to work at least to some extent. Would love to see real support for the new .csproj files. The stable tooling has been released yesterday. |
I have still no success in parsing csproj using Roslyn 4.0-rc4. As @rschili mentioned above, including *.cs is a workaround for now. We are waiting for the stable version of Roslyn. |
Why would anyone still use RC4 when RTM is available? BTW: RC4 is nearly a month old now (even the version on nuget.org). EDIT: According to dotnet/roslyn#17439, the new multi-TFM MSBuild workspaces still aren't supported yet. So I guess that we have to wait for the next version. |
@fubar-coder The issue is that DocFx has been broken for MSBuild 2017 projects ever since they were introduced in RC3 and replaced project.json, and is still broken despite 2017 now being available as RTM. |
The *.cs workaround does not seem to be working properly for me. It builds most of the docs, but misses some of the cross references that worked with the old setup. This is the last showstopper to being able to update all my repos to the new project format. Any ETA on when this will happen, especially now that 2017 is RTM and released? |
@ThadHouse: Can you give a specific example of the kind of cross-reference that doesn't work? I'd really like to move Noda Time onto VS2017 and csproj projects, and docfx is my last blocker (just like you). I'm tempted to try the |
@jskeet https://github.com/robotdotnet/CameraServer/blob/master/src/FRC.CameraServer/CvSource.cs#L42 This was one of the links specifically that didn't work. And there were some others like this that had issues as well. But some of these worked, so I don't know exactly the root cause. |
@ThadHouse: I found that with I've ended up keeping separate |
Hmm. With mine all didn't fail, but enough did to make me not want to switch. I think I'm going to end up keeping the |
We tried upgrading to net46 and Roslyn 2.0, but still have problem to open csproj. We are working to resolve it. A prerelease version will be published when it's ready. |
Waiting for dotnet/docfx#1254 to be fixed
Temporary fix while waiting on dotnet/docfx#1254
Any updates on this @superyyrrzz ? Much like @jskeet and @ThadHouse, this is blocking me on all my newer projects, and at this rate I may need to change documentation system, which I'd really rather not. The new tooling is all now RTM and released and has been for a little while now.. |
@superyyrrzz @agc93 I was also waiting for this to get fixed and decided to debug it myself. Turns out that even if you use the latest Roslyn packages for Microsoft.CodeAnalysis, the Looks like the roslyn guys are still working on it (see answer in this dotnet/roslyn#17439) |
Damn so looks like we're going to have to wait for DocFX to do the work for a custom workspace (a la Omnisharp) since Roslyn don't have the best track record of fixing bugs like that quickly :( |
Yup ~~. @vicancy regarding that workaround with project.json. I found that you removed support for that in 158f883#diff-adb6899f8fe77eb74e99a5f4ac3223ccL31. Could you leave that in until the csproj issues are sorted? ;) |
@MichaCo the latest csproj will be supported in the upcoming release of docfx, together with the removal of support for |
@MichaCo What's the csproj format not working? https://github.com/dotnet/docfx/blob/dev/test/docfx.Tests/Assets/net46-test.csproj.sample.1 such format works. And when I use |
Hi @agc93 & @MichaCo , for
If you have different classes/methods with different frameworks, it is a little bit complex.
{
"metadata": [
{
"src": "*.csproj",
"dest": "temp/api/netstandard1.4",
"properties": {
"TargetFramework": "netstandard1.4"
}
},
{
"src": "*.csproj",
"dest": "temp/api/net46",
"properties": {
"TargetFramework": "net46"
}
}
]
....
}
"merge": {
"content": [
{
"files": "*.yml",
"src": "temp/api/netstandard1.4",
},
{
"files": "*.yml",
"src": "temp/api/net46",
}
],
"fileMetadata": {
"platform": {
"temp/api/netstandard1.4/*.yml": [
"netstandard1.4"
],
"temp/api/net46/*.yml": [
"net46"
]
}
},
"dest": "api"
}, A sample docfx.json for such case is: https://github.com/dotnet/docfx/pull/1549/files#diff-7e05ae9b74959cf7a2bfe05633158109R12 |
@vicancy wow that looks really promising, thanks for the explanation of how to use multiple targets. Didn't played with multiple outputs yet. I guess I have to build some custom templates to do something with Thanks a lot! Will give it a try when you publish it ;) |
@MichaCo yes, multi-platform is not yet supported by default template..... We will be very happy to incorporate your custom template for |
the latest version 2.16 supports the new csproj format, please have a try. |
Hi "metadata": [
{
"src": "...",
"dest": "...",
"properties": {
"TargetFramework": <one_of_your_framework>
}
},
] Maybe this should be included in the official documentation. Best Regards |
Merge is broken in latest docfx. See dotnet/docfx#2289 and linked issues. We can use merge to add data regarding what platform API is available on. Details in following comment: dotnet/docfx#1254 (comment)
Merge is broken in latest docfx. See dotnet/docfx#2289 and linked issues. We can use merge to add data regarding what platform API is available on. Details in following comment: dotnet/docfx#1254 (comment)
@vicancy 关于不同框架内使用properties标识框架:
我的项目由.Net Framework4.6.1以及.Net Core2.0组成,我解析元数据的时候是解析Core的程序集。我设置为 netcore2.0 时控制台输出警告 无法识别netcore2.0 这个问题是写法的原因还是解析不了core?我看你们有framewok46和netstandardXX,但是没有core的说明? |
@XzMitsui 应该是 |
@vicancy 好的谢谢,我找到它了。这里还有两个疑问想请教下,一个是关于语言,为了增强国际性,docfx文档中有没有实现切换语言的功能,从项目中生成的都是英文版本,但面临多国用户的话需要不同语言版本,不知道此工具有没有已实现的集成?第二个是我之前开了问题,关于过滤文件的,我给出了我这里的配置想要过滤掉一些不想展示的抽象类等,但是它始终没起到作用。 |
|
Am I the only one not seeing latin here? |
@dbogatov DocFX Team is based in China, so what you are seeing above is another Chinese dev talking to the DocFX dev team about |
@vicancy |
@vicancy |
* Updated the code docs to work with new assemblies and namespaces+added conditional build to default pipeline * updated script that generate docs to use .NET 5 * Increased timeout of docs generation + changed to 5.x instead of 5.0.x Fixed wrong namespace, that would be we not have docs for it. * Fixed names in toc, so they are not that long and changed ordering * try custom hack dotnet/docfx#1254 (comment) * revert nonworking hack - Divide prep steps into two. * Changed ordering * Try to generate docs without the build.ps1 script * Try to generate docs without the build.ps1 script * Try to generate docs without the build.ps1 script * Try to remove the examine one, to test if that is the reason it fails on azure pipeline * Try to remove the sqlce one, to test if that is the reason it fails on azure pipeline * Reintroduce Examine and SqlCE docs, as these was not the reason it will not work on azure pipeline. * Test if azure wanna build the docs without explicit version * Fixed two malformed xml docs * hardcode version of docfx, to hopefully let it pass on azure pipeline * hardcode version of docfx, to hopefully let it pass on azure pipeline * Restructure azure pipeline yaml to have stages as areas instead of OS * Restructure azure pipeline yaml to have stages as areas instead of OS * yml restructure * yml restructure * yml restructure * Not hardcoding docfx as the old versions also fail on azure * Fixed Badly formed XML comments * moved condition from job to stage * split build and metadata * indentation * removed wrong char * Try to add more loging on azure pipeline * include less * include less projects * add one more project * More azure pipeline test * indentation * All except infrastructure * publish tasks * Fix link on logo * Extensions also included * Less links * re-introduced infrastructure to the list of projects for generate docfx for. * Add filter * Remove single warning for xmldocs * more logging? * skip some things from the metadata * test using other image * Test if exclude filter works * Test with more explict filters, allowing some docs from Infrastructure * binary search for the file that is the issue * binary search for the file that is the issue * binary search for the file that is the issue * Exclude more folders * Exclude more folders and files * Only exclude files in root of namespace? * more filter trials * more filter trials * add 2 nested folders * all cs files? * Remove test projects * Toc * Update build/azure-pipelines.yml * move display name element * Update build/azure-pipelines.yml Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
The workaround for merging docs for multiple target frameworks that @vicancy described above is not actually working. Is there really no way to use DocFx with multi-targeting libraries? Seems like such a basic thing to prioritize, but I may be missing the context the team uses for deciding on issue priorities. Would it be please possible to learn whether there is any hope for this to be addressed in the foreseeable future, or should we be looking for completely different solutions for the time being? |
Support for .NET Core Tooling Preview3+ projects
When building API documentation for a project that uses .NET Core Preview 3 or higher (csproj), the build fails, because (roslyn?) is unable to parse PackageReference tags
Functional impact
API documentation can not be built for projects that use .NET Core
Minimal repro steps
Expected result
The build would succeed and API documentation would be built.
Actual result
During the 'generating metadata' phase of the build, a warning is thrown opening the project.
Warning: Error opening project <project>.csproj: The attribute "Version" in element <PackageReference> is unrecognized.. Ignored.
No API documentation is built.
Further technical details
N/A
Sample csproj/docfx.json for reference
The text was updated successfully, but these errors were encountered: