-
Notifications
You must be signed in to change notification settings - Fork 866
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
After Visual Studio update - docfx does not work anymore :-( #8097
Comments
I guess DocFX is shipped with older assemblies that are then not compatible with what MSBuild requires nowadays. A workaround would be to first run MSBuild to compile the sources to DLL and XML files, and then configure DocFX to read the DLL files rather than csproj files. That way, MSBuild and DocFX are in separate processes, and each can use its own assembly versions without conflict. |
Hi, thanks for the quick response. |
@c-ohle I do not know if I understand the problem. I created a DocFx project in the project directory, changed the JSON file as follows. I built it with {
"metadata": [
{
"src": [
{
"files": [
"System.Numerics.Rational.csproj"
],
"src": "../System.Numerics.Rational/"
}
],
"dest": "api",
"disableGitFeatures": false,
"disableDefaultFilter": false
}
],
"build": {
"content": [
{
"files": [
"api/**.yml",
"api/index.md"
]
},
{
"files": [
"articles/**.md",
"articles/**/toc.yml",
"toc.yml",
"*.md"
]
}
],
"resource": [
{
"files": [
"images/**"
]
}
],
"overwrite": [
{
"files": [
"apidoc/**.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"dest": "_site",
"globalMetadataFiles": [],
"fileMetadataFiles": [],
"template": [
"default"
],
"postProcessors": [],
"markdownEngineName": "markdig",
"noLangKeyword": false,
"keepFileLink": false,
"cleanupCacheHistory": false,
"disableGitFeatures": false
}
} The output log (edited the directories, for privacy):
|
@paulushub, thanks a lot for your efforts. Is it maybe because have the docfx folder beside - not inside the project? |
OK, lets see it. |
@c-ohle It seems to work fine on my system. |
I deleted the cache more than once. Sure that you have the latest VS update? |
Morning, it seems to be a Microsoft issue. I debugged docfx (unchanged). As you can see, it crashes in Microsoft.Build and has nothing to do with docfx or wrong pathes. Maybe it would help to upgrade the packages, but I know, the dependencies, new conflicts etc. |
That was the only problem I had. VS is updated, here is the copy and paste from the About Dialog:
Have you made changes to your project? I am only using the codes in the Github repository. |
Before there was only one function |
Having the same issues with other tooling (not docfx). I suspect that it is something that changed in MSBuild (I do have preview installed, but it also happens to the stable versions). Maybe the SDK version that shipped last Patch Tuesday? |
@GeertvanHorrik Thanks, we are getting somewhere now. I was wondering why I could not reproduce the error. |
@c-ohle The configuration is similar to the
or
|
If that was all it would be great. Good work. I will try... |
FYI, we have the same exception, that started appearing with 17.3 Preview 3 in Uno, possibly in our Source Generators, for users that had LangVersion forced at 8.0 in their project: unoplatform/uno#9297 |
@francoistanguay, yes that is exactly the same. I have already reported this in the appropriate dev channel. I'm working on 3D modeling algorithms based on rational arithmetic to avoid epsilon and robustness problems. |
FWIW, while this work around works, it runs MUCH slower. I don't think this issue should be closed until VS fixes the underlying issue that broke it! Here's the root issue: dotnet/msbuild#7832 |
The workaround of using the For example, using |
Another example is the enumerations which are shown as sealed classes derived from |
* Upgrade to BenchmarkDotNet 0.13.2 - Bump BDN dependency to 0.13.2 and remove transitive pinning for System.Management. - Bump SDK version to 6.0.400 in global.json. - Resync ApiCompat wrappers for 0.13.2 (drop support for older versions) - Adjust tests for API changes in 0.13.2 Closes #116, closes #115, closes #104. Contributes to #117. * Local copy of xrefmap-BenchmarkDotNet.yml no longer necessary for BDN 0.13.2 * Temporarly disable DocFx build on Windows See dotnet/docfx#8097 See #119 * Set 0.13.2 as baseline for BDN API Compatibility Check Contributes to #117
While implementing the workaround for this (using the DLL instead of the csproj), I ran into this issue again: #7035, except the workaround of "just run it twice" doesn't seem to work when using the DLL. Had limited success with Ubuntu on WSL via I'm no stranger to dealing with bugs and workarounds, but we're fully blocked here until something gets fixed. |
@Arlodotexe Thanks for letting us know before we do the same and waste time. |
Even I tried because it breaks most of our lib docs ci. If I read correctly, it is msbuild right? Any chance to replace that manually? |
With GitHub's CI images, I only had the problem with
Successful CI run with docfx build on Windows disabled: https://github.com/mawosoft/Mawosoft.Extensions.BenchmarkDotNet/actions/runs/2944501729 |
This workaround proposed by jskeet works even with |
This fix works fine Our changes: here Hope microsoft still fixes it tho. @vers-one thanks for the other method, didn't test tho because the first one is easier for me |
We face the issue from dotnet/docfx#8097. We fix it with [this hacky fix]. [this hacky fix]: dotnet/docfx#8097 (comment)
We face the issue from dotnet/docfx#8097. We fix it with [this hacky fix]. [this hacky fix]: dotnet/docfx#8097 (comment)
We face the issue from dotnet/docfx#8097. We fix it with [this hacky fix]. [this hacky fix]: dotnet/docfx#8097 (comment)
We face the issue from dotnet/docfx#8097. We fix it by downgrading to windows-2019 image in the CI, since that image contains VisualStudio 2019, where the issue does not arise.
We face the issue from dotnet/docfx#8097. We fix it by downgrading to windows-2019 image in the CI, since that image contains VisualStudio 2019, where the issue does not arise.
@asklar After updating my |
Same issue with all my projects, seems not able to build the metadata from the project file *.csproj anymore. Visual studio Version 17.5.4 It seems solved on docfx console 2.59.4, any chance to have an updated nuget ? |
Version 2.59.4 is ok and build is working again but just needed to install it via the Package manager PM>NuGet\Install-Package docfx.console -Version 2.59.4 |
Operating System:
Windows 11 Pro
DocFX Version Used: docfx 2.59.1.0
Template used:
statictoc
Steps to Reproduce:
Latest VS update (today) Microsoft Visual Studio Community 2022 (64-bit) - Version 17.2.6
docfx:
Build succeeded with warning.
[22-07-13 12:35:02.625]Warning:MetadataCommand.ExtractMetadataWorkspace failed with: [Failure] Msbuild failed when processing the file 'C:\Users\cohle\Desktop\RationalNumerics\System.Numerics.Rational\System.Numerics.Rational.csproj' with message: Methode nicht gefunden: "System.ReadOnlySpan
1<Char> Microsoft.IO.Path.GetFileName(System.ReadOnlySpan
1)".[22-07-13 12:35:02.628]Warning:[MetadataCommand.ExtractMetadata]Project 'C:\Users\cohle\Desktop\RationalNumerics\System.Numerics.Rational\System.Numerics.Rational.csproj' does not contain any documents.
[22-07-13 12:35:02.629]Warning:[MetadataCommand.ExtractMetadata]No metadata is generated for System.Numerics.Rational.
3 Warning(s)
0 Error(s)
For project - URL: https://github.com/c-ohle/RationalNumerics
Any quick workaround?
The text was updated successfully, but these errors were encountered: