docfx
docfx copied to clipboard
docfx v2 creates wrong metadata for .NET472 project when Visual Studio 2022 gets installed
Operating System: Windows
DocFX Version Used: 2.58.4
Steps to Reproduce:
- Install VS2019
- md c:\temp\docfx && c:\temp\docfx
- docfx init --quiet
- cd docfx_project\src
- dotnet new classlib -f netstandard2.0
- change project type to "net472"
- Create file
IInterface.cs
with the content below. - cd ..
- docfx metadata --force
- check docfx_project\api\src.IInterface.yml
- Install VS2022 (preview)
- docfx metadata --force
- check docfx_project\api\src.IInterface.yml
using System;
using System.Threading;
using System.Threading.Tasks;
namespace src
{
public interface IInterface
{
Task<int> RunAsync(CancellationToken ct);
}
}
Expected Behavior: The metadata generated for the interface are identical.
Actual Behavior:
The "uid" of RunAsync
is changed from
src.IInterface.RunAsync(System.Threading.CancellationToken)
to
src.IInterface.RunAsync(CancellationToken)
The name of system types loses the namespace qualifier which causes "invalid cross reference(s)" warnings and broken links.
- If VS2019 and VS2022 are installed, how to force docfx to use VS2019?
- Are changes in VS2022 required before RTM release? I think the uid should be generated always with the fully qualified name.
- I could reproduce the issue so far only with net472. Maybe other targets are affected too.
I've noticed this is happening for me as well for monoandroid and UWP TFMs, but it works fine for other TFMs. I'm guessing there's some sort of type-lookup issue with docfx for some frameworks.