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
[Bug] Solutions with code generator projects fail to build #9775
Comments
I built it by adding the <PropertyGroup>
<AssemblyTitle>Terminaux</AssemblyTitle>
<AssemblyDescription>Console Manipulation Library</AssemblyDescription>
<Description>A C# library that allows you to manipulate with your console, like colors, VT sequences, and more.</Description>
<Version>3.1.5</Version>
<Authors>Aptivi</Authors>
<TargetFramework>netstandard2.0</TargetFramework>
<DebugType>portable</DebugType>
<AssemblyName>Terminaux</AssemblyName>
<PackageId>Terminaux</PackageId>
<PackageTags>console;shell;readline;gnu;cui;tui;cli;manipulation;console;vt;sequences;color;vt100;truecolor;library;csharp;reader;input;writer;styles;formatter</PackageTags>
<PackageProjectUrl>https://github.com/Aptivi/Terminaux</PackageProjectUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/Aptivi/Terminaux</RepositoryUrl>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Company>Aptivi</Company>
<Copyright>Copyright (c) 2022-2023 Aptivi.</Copyright>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageIcon>OfficialAppIcon-Terminaux-512.png</PackageIcon>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\aptivi_snk.snk</AssemblyOriginatorKeyFile>
<CompilerGeneratedFilesOutputPath>Generated</CompilerGeneratedFilesOutputPath>
</PropertyGroup>
|
Thanks! Your suggestions worked! I also had to start installing DocFX manually in the workflow instead of using Docker to do the same thing. Changes here. |
I think you will also need <ItemGroup>
<Compile Remove="$(CompilerGeneratedFilesOutputPath)/**/*.cs" />
</ItemGroup> and add the Reference (work that prompted the #9619): |
I've added the above ItemGroup to the project file and added the Generated folder to .gitignore. Thanks! However, the documentation now fails to build again with this:
|
Sorry, please reopen the issue. |
OK, I've re-opened the issue. That's most likely the Roslyn version issue because Terminaux uses 4.9.2 and the latest public release of docfx uses 4.8.0. |
Latest version of docfx (2.76.0) use roslyn version 4.9.2. So roslyn version relating problems will not expected occurred after docfx updates. |
It might help to include a test sample so that future changes could be monitored. |
Describe the bug
The projects in the solution with the code generators cause DocFX to fail to generate documentation. After updating Microsoft.CodeAnalysis.CSharp from 4.8.0 to 4.9.2, DocFX began to fail to generate documentation if there were projects that referenced a namespace generated by the code generator.
To Reproduce
Steps to reproduce the behavior:
docfx
command, pointing it to theDocGen/docfx.json
file:docfx DocGen/docfx.json
Expected behavior
DocFX successfully recognizes all generated code and builds the documentation.
Context (please complete the following information):
Additional context
The failed build log is here and the docfx.json is here. It worked fine before upgrading Microsoft.CodeAnalysis.CSharp from 4.8.0 to 4.9.2 with all the generated code, such as this.
It looks like that the code generators – Terminaux.ColorDataGen, Terminaux.SequenceTypesGen, and Terminaux.TermInfoGen – didn't generate anything during DocFX's build stage, hence the
error CS0234: The type or namespace name 'Types' does not exist in the namespace 'Terminaux.Sequences.Builder' (are you missing an assembly reference?)
errors.Previously, all code generators worked perfectly fine as in this log.
The text was updated successfully, but these errors were encountered: