dotnet / docfx

Static site generator for .NET API documentation.

Home Page:https://dotnet.github.io/docfx/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failing on AppVeyor

richardschneider opened this issue · comments

When building the documentation on AppVeyor, I get a warning. On my machine, there is no warning.

docfx metadata doc\docfx.json -f
Warning: Invalid cref value "!:System.String" found in triple-slash-comments for Decode defined in ../src/Base32.cs Line 66, ignored

The docfx.json has "xref": [ "msdn.4.5.2.zip" ]. And the zip file is in the repo.

!:System.String that means Roslyn cannot find the string type, please make sure your environment can build code correctly.

@qinezh any idea?
project is here

From the description, it seems that there's something wrong within AppVeyor environment. Maybe you could try to modify some configuration in appveyor.yml, such as disable package cache, etc...

@qinezh I've just enabled package caching, after reporting the issue. All NuGet and choco packages and up to date. I also changed appyeyor.yml to use VS 2015. I'm using dotfx v2.9.3 from choco.

What config changes do you want me to make? I'm happy to try anything!

What are the requirements for docfx? Do I need a specific .Net framework? ...?

.NET 452 is enough...

I changed the target framework version from 4.5 to 4.5.2 and still no love!

Richard, how did you resolve this?

No I haven't, I'm still getting invalid cref. I've tried numerous hacks with no luck so far.

I will take a look at what you did with LimeVideoSdk, tomorrow (I'm .UTC+1300) and see if it helps.

Your comment on #1097 is greatly appreciated.

I've been looking at Roslyn, and have determined that invalid cref of "!:System.String" is generated when the source is analysed and assembly references are not specified.

Could my problem be that the assembly references from the project are not being used? In particular mscorlib.

When running on appveyor the assembly references are MISSING!

I modified Microsoft.DocAsCode.Metadata.ManagedReference/ExtractMetadataWorker.GetProjectMetadataFromCacheAsync to display all the documentCache.GetDocuments. On my machine it displays the assembly references and the source files for the project. On appveyor it does NOT display the assembly references only the source files.

@vicancy @qinezh I need some help here. The whole generation of metadata and use of Roslyn is very complex and frankly I can't understand it. Hopefully I'v given you guys enough hints to find a fix.

The issue was solved by @vicancy

Do NOT use platform: Any CPU in appveyor.yml.