You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When DocFX is run by the Exec task in MSBuild on Windows, and DocFX outputs a warning in which the file path exceeds 80 characters, it inserts a line break after the first 80 characters. That causes MSBuild not to parse the first line as part of the file path.
To Reproduce
Steps to reproduce the behavior:
C:\>mkdir C:\Projects\ThisDirectoryHasALongNameToDemonstrateTheLineWrappingInTheWarningMessage
C:\>cd \Projects\ThisDirectoryHasALongNameToDemonstrateTheLineWrappingInTheWarningMessage
C:\Projects\ThisDirectoryHasALongNameToDemonstrateTheLineWrappingInTheWarningMessage>dotnet new globaljson --sdk-version 6.0.417
The template "global.json file" was created successfully.
C:\Projects\ThisDirectoryHasALongNameToDemonstrateTheLineWrappingInTheWarningMessage>dotnet new tool-manifest
The template "Dotnet local tool manifest file" was created successfully.
C:\Projects\ThisDirectoryHasALongNameToDemonstrateTheLineWrappingInTheWarningMessage>dotnet tool install --local docfx --version 2.74.0
You can invoke the tool from this directory using the following commands: 'dotnet tool run docfx' or 'dotnet docfx'.
Tool 'docfx' (version '2.74.0') was successfully installed. Entry is added to the manifest file C:\Projects\ThisDirectoryHasALongNameToDemonstrateTheLineWrappingInTheWarningMessage\.config\dotnet-tools.json.
C:\Projects\ThisDirectoryHasALongNameToDemonstrateTheLineWrappingInTheWarningMessage>dotnet docfx init
This utility will walk you through creating a docfx project.
It only covers the most common items, and tries to guess sensible defaults.
Name (mysite): mysite
Generate .NET API documentation? [y/n] (y): n
Markdown docs location (docs): docs
Enable site search? [y/n] (y): n
Enable PDF? [y/n] (y): n
About to write to C:\Projects\ThisDirectoryHasALongNameToDemonstrateTheLineWrappingInTheWarningMessage\docfx.json:
{
"build": {
"content": [
{
"files": [
"**/*.{md,yml}"
],
"exclude": [
"_site/**"
]
}
],
"resource": [
{
"files": [
"images/**"
]
}
],
"output": "_site",
"template": [
"default",
"modern"
],
"globalMetadata": {
"_appName": "mysite",
"_appTitle": "mysite",
"_enableSearch": false,
"pdf": false
}
}
}
Is this OK? [y/n] (y): y
Project created at C:\Projects\ThisDirectoryHasALongNameToDemonstrateTheLineWrappingInTheWarningMessage
Run docfx C:\Projects\ThisDirectoryHasALongNameToDemonstrateTheLineWrappingInTheWarningMessage\docfx.json --serve to launch the site.
C:\Projects\ThisDirectoryHasALongNameToDemonstrateTheLineWrappingInTheWarningMessage>echo.> index.md
C:\Projects\ThisDirectoryHasALongNameToDemonstrateTheLineWrappingInTheWarningMessage>echo>index.md [Dangling link](doesnotexist.md)
C:\Projects\ThisDirectoryHasALongNameToDemonstrateTheLineWrappingInTheWarningMessage>
C:\Projects\ThisDirectoryHasALongNameToDemonstrateTheLineWrappingInTheWarningMessage>dotnet msbuild
MSBuild version 17.3.2+561848881 for .NET
Searching custom plugins in directory
C:\Users\Kalle\.nuget\packages\docfx\2.74.0\tools\net6.0\any\...
No files are found with glob pattern images/**, excluding <none>, under
directory
"C:\Projects\ThisDirectoryHasALongNameToDemonstrateTheLineWrappingInTheWarningMe
ssage"
6 plug-in(s) loaded.
Building 3 file(s) in
ConceptualDocumentProcessor(BuildConceptualDocument=>CountWord=>ValidateConceptu
alDocumentMetadata)...
Building 2 file(s) in TocDocumentProcessor(BuildTocDocument)...
C:\Projects\ThisDirectoryHasALongNameToDemonstrateTheLineWrappingInTheWarningMes
sage\index.md(1,1): warning InvalidFileLink: Invalid file [C:\Projects\ThisDirectoryHasALongNameToDemonstrateTheLineWrappingInTheWarningMessage\Docs.msbuildproj]
link:(~/doesnotexist.md).
Applying templates to 5 model(s)...
XRef map exported.
Build succeeded with warning.
1 warning(s)
0 error(s)
Now I'm getting similar line wrapping on the Playwright error message when attempting to run Chromium on an older Windows OS that does not define the required APIs: "The specified procedure could not be found." Also, the exception stack trace formatted by Spectre.Console omits the type names and source directory paths, although it shows the method names, parameter lists, file names, and line numbers.
I wish I could entirely disable Spectre.Console text wrapping and other output formatting for my automated build scenarios, where it is not possible for Spectre.Console to know in advance how wide the window will be when the build log is eventually viewed.
Describe the bug
When DocFX is run by the Exec task in MSBuild on Windows, and DocFX outputs a warning in which the file path exceeds 80 characters, it inserts a line break after the first 80 characters. That causes MSBuild not to parse the first line as part of the file path.
To Reproduce
Steps to reproduce the behavior:
Add
Docs.msbuildproj
containing:Run MSBuild:
MSBuild highlights only this line in yellow:
Expected behavior
The whole warning should be one line, with no embedded line breaks.
Context (please complete the following information):
dotnet msbuild
from .NET SDK 6.0.417)Additional context
The width of the console window does not seem to matter for this.
I guess the bug is related to Spectre.Console.
The text was updated successfully, but these errors were encountered: