.netstandard2.0 Project - DocFX MSBuild Error

If you are facing issues when trying to generate documentation for your .netstandard2.0 project. Try the solution mentioned in this post.

commit 7bfd514 · authored · 1 min read

.netstandard2.0 Project - DocFX MSBuild Error

I tried to generate documentation for a .netstandard2.0 project using DocFX.

  • Installed DocFX using chocolatey package.
  • Created a sample project using command line.
Terminal window
docfx init
  • Updated the docfx.json w.r.t the folder structure.
  • Build the website using command line.
Terminal window
docfx --serve

The DocFX site builded but project specific documentation not generated. And there were some warnings like

Warning:No metadata is generated for ProjectName

SDK “Microsoft.NET.Sdk” not found

Solution

Set environment variable MSBuildSDKsPath pointing right to the SDK path. In my case,

C:\Program Files\dotnet\sdk\2.1.500\Sdks

After setting the environment variable, closed the command line (VS Code) and re opened. Tried building the DocFX again and it worked.

Additional Resources

local graph · open full graph

".netstandard2.0 Project - DocFX MSBuild Error" is connected to the topics .NET Core, DocFX, Documentation and related to 4 other entries. .NET Core - NuGet Packages CI & CD Using GitHub Actions .NET Core - NuGet Packages … Azure DevOps Build - Could not locate the assembly Azure DevOps Build - Could … Using AutoMapper in a .NET Core Class Library Using AutoMapper in a .NET … Microsoft Orleans - Run Multiple Silos from a .NET Core Console App Microsoft Orleans - Run Mul… .NET Core #dotnet-core DocFX #docfx Documentation #documentation .netstandard2.0 Project - DocFX M…

comments

loading discussion…