Closed 9ee1 closed 1 year ago
In my system, I have had the same error. After updating my "docfx" version to 2.43.3. It works. My Visual Studio 2019 is Version 16.1.6 Enterprise and .NET Core version is 2.2.104.
On other VM, I have only Visual Studio Build Tools 2019 without Visual Studio IDE. It works. I don't know Community Edition. If both IDE and Build Tools are installed, could be the problem?
Same problem, how can I create docs for a .NET Core project. FYI: my project is a multi-target project.
From my .csproj file.
<TargetFrameworks>netstandard2.0;netcoreapp3.0;net45</TargetFrameworks>
@kdawg1406 This may help: https://github.com/dotnet/docfx/issues/1254#issuecomment-294080535
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.
Closing this issue after a prolonged period of inactivity. If you still think this issue is relevant, please feel free to ping a maintainer or leave a comment.
Same problem for me. Target is net472 and netcoreapp3.1 I've set the targetframework on net472 in docfx.json Using Visual Studio Community 2019 16.6.3 and Visual studio Build Tools 2017
1>[20-10-20 09:17:11.198]Warning:[MetadataCommand.ExtractMetadata](D:/Source/Repos/EDK4NetMultiTarget/EDK4NetMultiTarget.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'D:\Source\Repos\EDK4NetMultiTarget\EDK4NetMultiTarget.csproj' with message: l'SDK 'Microsoft.NET.Sdk' specificato non è stato trovato. D:\Source\Repos\EDK4NetMultiTarget\EDK4NetMultiTarget.csproj
1>[20-10-20 09:17:11.198]Warning:[MetadataCommand.ExtractMetadata]Project 'D:\Source\Repos\EDK4NetMultiTarget\EDK4NetMultiTarget.csproj' does not contain any documents.
1>[20-10-20 09:17:11.198]Warning:[MetadataCommand.ExtractMetadata]No metadata is generated for EDK4NetMultiTarget.
1>[20-10-20 09:17:11.198]Warning:[BuildCommand.BuildCore.Build Document.Load.TocDocumentProcessor](articles/toc.yml)Skipping GetFileDetail. Exception found: Microsoft.DocAsCode.Common.Git.GitException, Message:
1>[20-10-20 09:17:11.198]Warning:[BuildCommand.BuildCore.Build Document.Load.TocDocumentProcessor](api/toc.yml)Skipping GetFileDetail. Exception found: Microsoft.DocAsCode.Common.Git.GitException, Message:
1>[20-10-20 09:17:11.198]Warning:[BuildCommand.BuildCore.Build Document.Load.TocDocumentProcessor](toc.yml)Skipping GetFileDetail. Exception found: Microsoft.DocAsCode.Common.Git.GitException, Message:
`
Same Problem for me: although i only target one version net5.0. I use docfx version 2.56.6:
[21-02-05 05:30:04.198]Info:Config file docfx.json found, start generating metadata...
[21-02-05 05:30:04.360]Info:[MetadataCommand.ExtractMetadata]Using msbuild C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin as inner compiler.
[21-02-05 05:30:04.548]Info:[MetadataCommand.ExtractMetadata]Loading projects...
[21-02-05 05:30:05.759]Warning:[MetadataCommand.ExtractMetadata](C:/Users/<UserName>/source/repos/<ProjectName>/<ProjectName>/<ProjectName>.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'C:\Users\<UserName>\source\repos\<ProjectName>\<ProjectName>\<ProjectName>.csproj' with message: The SDK 'Microsoft.NET.Sdk.Web' specified could not be found. C:\Users\<UserName>\source\repos\<ProjectName>\<ProjectName>\<ProjectName>.csproj
[21-02-05 05:30:05.872]Warning:[MetadataCommand.ExtractMetadata]Project 'C:\Users\<UserName>\source\repos\<ProjectName>\<ProjectName>\<ProjectName>.csproj' does not contain any documents.
[21-02-05 05:30:05.905]Info:[MetadataCommand.ExtractMetadata]Cache for C:/Users/<UserName>/source/repos/<ProjectName>/<ProjectName>/<ProjectName>.csproj in C:\Users\<UserName>\source\repos\<ProjectName>\<ProjectName>\obj\xdoc\cache\final\-236949522 is corrupted, rebuild...
[21-02-05 05:30:05.908]Info:[MetadataCommand.ExtractMetadata]Generating metadata for each project...
[21-02-05 05:30:06.113]Info:[MetadataCommand.ExtractMetadata]'C:/Users/<UserName>/source/repos/<ProjectName>/<ProjectName>/<ProjectName>.csproj' keep up-to-date since '2/5/2021 5:14:16 PM', cached intermediate result 'C:/Users/<UserName>/source/repos/<ProjectName>/<ProjectName>/obj/xdoc/cache/obj\b3fb53ss.zfm' is used.
[21-02-05 05:30:06.229]Warning:[MetadataCommand.ExtractMetadata]No metadata is generated for <ProjectName>.
[21-02-05 05:30:06.279]Info:[MetadataCommand]Completed Scope:MetadataCommand in 1939.1716 milliseconds.
[21-02-05 05:30:06.406]Info:[BuildCommand]6 plug-in(s) loaded.
[21-02-05 05:30:06.431]Info:[BuildCommand]No files are found with glob pattern apidoc/**.md, excluding obj/**,_site/**, under directory "C:\Users\<UserName>\source\repos\<ProjectName>\<ProjectName>"
[21-02-05 05:30:06.435]Info:[BuildCommand]No files are found with glob pattern images/**, excluding <none>, under directory "C:\Users\<UserName>\source\repos\<ProjectName>\<ProjectName>"
[21-02-05 05:30:06.458]Info:[BuildCommand]Markdown engine is markdig
[21-02-05 05:30:06.617]Info:[BuildCommand.BuildCore.Build Document]Max parallelism is 8.
[21-02-05 05:30:07.353]Info:[BuildCommand.BuildCore.Build Document.CompilePhaseHandlerWithIncremental.TocDocumentProcessor]Building 3 file(s) in TocDocumentProcessor(BuildTocDocument)...
[21-02-05 05:30:07.355]Info:[BuildCommand.BuildCore.Build Document.CompilePhaseHandlerWithIncremental.ConceptualDocumentProcessor]Building 0 file(s) in ConceptualDocumentProcessor(BuildConceptualDocument=>CountWord=>ValidateConceptualDocumentMetadata)...
[21-02-05 05:30:07.612]Info:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.Apply Templates]Applying templates to 3 model(s)...
[21-02-05 05:30:08.070]Info:[BuildCommand.BuildCore.Build Document]XRef map exported.
[21-02-05 05:30:08.225]Info:[BuildCommand.Postprocess]Manifest file saved to manifest.json.
[21-02-05 05:30:08.286]Info:[BuildCommand]Completed building documents in 1873.4641 milliseconds.
[21-02-05 05:30:08.290]Info:[BuildCommand]Completed Scope:BuildCommand in 2008.6394 milliseconds.
[21-02-05 05:30:08.292]Info:Completed in 3955.3164 milliseconds
Build succeeded with warning.
[21-02-05 05:30:08.303]Warning:[MetadataCommand.ExtractMetadata](C:/Users/<UserName>/source/repos/<ProjectName>/<ProjectName>/<ProjectName>.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'C:\Users\<UserName>\source\repos\<ProjectName>\<ProjectName>\<ProjectName>.csproj' with message: The SDK 'Microsoft.NET.Sdk.Web' specified could not be found. C:\Users\<UserName>\source\repos\<ProjectName>\<ProjectName>\<ProjectName>.csproj
[21-02-05 05:30:08.306]Warning:[MetadataCommand.ExtractMetadata]Project 'C:\Users\<UserName>\source\repos\<ProjectName>\<ProjectName>\<ProjectName>.csproj' does not contain any documents.
[21-02-05 05:30:08.307]Warning:[MetadataCommand.ExtractMetadata]No metadata is generated for <ProjectName>.
3 Warning(s)
0 Error(s)
Seeing a similar issue except I'm using MSBuild.Sdk.Extras.
My project files use additional target frameworks for Windows, Android, iOS, and macOS, e.g.
<Project Sdk="MSBuild.Sdk.Extras">
<PropertyGroup>
<TargetFrameworks>uap10.0.17763;MonoAndroid10.0;xamarinios10;netstandard2.0;xamarinmac20</TargetFrameworks>
</PropertyGroup>
</Project>
Results in
[21-04-05 08:58:46.849]Warning:[MetadataCommand.ExtractMetadata](C:/S/<repo>/src/<project>/<project>.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'C:/S/<repo>/src/<project>/<project>.csproj' with message: Could not load SDK Resolver. A manifest file exists, but the path to the SDK Resolver DLL file could not be found. Manifest file path 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\SdkResolvers\Microsoft.Build.NuGetSdkResolver\Microsoft.Build.NuGetSdkResolver.xml'. SDK resolver path: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\CommonExtensions\Microsoft\NuGet\Microsoft.Build.NuGetSdkResolver.dll C:/S/<repo>/src/<project>/<project>.csproj
I've been dealing with this for two days. What fixed it was bumping "Microsoft.Build.Locator" from "1.2.2" to "1.4.1" on Microsoft.DocAsCode.Metadata.ManagedReference.csproj. Hopefully, they will take a PR for it.
DocFX 2.58 was just released. Tested, and it indeed fixes the issue. Thanks @jamiehankins !!
Also getting this error message and have been trying to resolve it off and on for several months now. Only targeting netstandard2.0
.
Even with a fresh docfx init
project, only changed to reference the csproj, I'm seeing this. Running the latest docfx and tried just about every trick and bit of advice on here.
Unfortunately I was one of those unlucky persons to come across this error as well.
No Visual Studio installed (instead I used Build Tools to get msbuild https://visualstudio.microsoft.com/downloads/?q#build-tools-for-visual-studio-2022)
No environment variable MSBuildSDKsPath
set
Dotnet SDK 6.0.201 (installed from here https://dotnet.microsoft.com/en-us/download)
The project I am working on is using netstandard2.1
as Target Framework.
After seeing multiple issues on Github and on other sites including Stackoverflow with various 'solutions' I tried some of them. But they all did not really work.
Modify
on the installed Build Tools version (for me 2022) .Net SDK
and hit install
It worked afterwards.
Before that dotnet
folder was only residing in C:\Program Files
Afterwards a second one got added to C:\Program Files (x86)
even though it is apparently not used.
Just wanted to leave this here in case anyone comes across this issue (sadly) as well. Hopefully this will help you.
Operation System: (
Windows
orLinux
orMacOS
)Windows
,Windows 10 X64
DocFX Version Used:
docfx 2.43.2.0
,Visual Studio 2019 Community Edition
,Visual Studio Build Tools 2019
,.NET Core 2.1.x to 2.2.x
SDKs. This is a.NET Standard 2.0
project.Template used: (
default
orstatictoc
or contain custom template)default
Steps to Reproduce:
docfx metadata
from the command lineExpected Behavior: Metadata is generated. This is a
.NET Standard 2.0
project.Actual Behavior: No metadata is generated. Error is
[Failure] Msbuild failed when processing the file '[FilePath]' with message: The SDK 'Microsoft.NET.Sdk' specified could not be found.
I have seen other tickets, most notably #1752, but it still not clear what the solution is. I have tried all the "hacks" there to no avail. Do we still need
Visual Studio Build Tools 2017
? If so from where? I tried going to https://visualstudio.microsoft.com/vs/older-downloads/ and I login as instructed but it says no downloads are available for my account. Do I really need to buy a subscription to get this to work? Furthermore, at https://visualstudio.microsoft.com/vs/older-downloads/,Visual Studio Build Tools 2017
is not even listed.Please refer to https://github.com/dotnet/docfx/issues/1752#issuecomment-341879582. That comment is 2 years old and there still has been no clear guidance on what the problem is and how to solve it.
Also, https://github.com/dotnet/docfx/issues/1907#issuecomment-318240898 suggests installing the full
Visual Studio 2017
but that comment is also 2 years old. What if our account doesn't allow us to downloadVisual Studio 2017
anymore?I realize this problem is probably just as frustrating for you as it is for the community, so I appreciate your patience.