-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Missing FileNameFactories #109
Comments
I have the same problem. |
hum that's weird, you have no peculiar settings for DefaultDocumentation? what OS are you using? |
Mine is a monorepo - it contains several projects, each building a separate NuGet package. I have a shared <Project>
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DefaultDocumentationFolder>$(SolutionDir)\wiki</DefaultDocumentationFolder>
<DefaultDocumentationLogLevel>Trace</DefaultDocumentationLogLevel>
<DisableDefaultDocumentation>false</DisableDefaultDocumentation>
<IsPackable>true</IsPackable>
...
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DefaultDocumentation" Version="0.8.1" />
...
</ItemGroup>
</Project>
|
After adding at least one class to each NuGet package in my solution, I can confirm the folder was being overwritten by each project during the build process. I've now moved the The command line is still broken however. So it must be some difference in the way DD is loaded (or the app domain is configured) in VS vs from the |
+1 on this one. I seem to have a similar problem to @TaffarelJr:
I investigated a bit and it seems like there may have been a break at v0.8.0. I've attached a solution. dotnet build runs fine (and outputs md files) for 0.7.7 (which we used up to now), 0.7.8 and 0.7.9 but fails with 0.8.0. The error is the same: FileNameFactory 'FullName' not found. I've attached an example. Just changing the reference to 0.7.9 in the csproj files makes it work with dotnet build. Will investigate further |
With the exact same configuration, this:
seems to return nothing with dotnet build whereas it contains all the factories when run in visual studio.. strange |
Could this be related to dotnet/runtime#44222 ? I've tried all kinds of variations of |
I have been using the dotnet cli locally and on github actions for a while without issue, I will have to check on my side if I can reproduce :/ (sorry I have not been available a lot lately I am in the process of moving home!)
You could have kept the shared configuration, just override the
0.8.0 uses plugins to dynamically load available implementations for the file name factory while 0.7.9 is just an enum switch factory so they are not really comparable :/ If I can reproduce the problem I will add more log to see what dll is actually loaded and why types does not coincide correctly when run from the cli. |
Yeah, as i looked through the history in hopes of finding what changed the behavior i realized that the whole plug-in architecture actually started in 0.8.0 so that turned out to be a dead end.
Well the fact that it works for you with the dotnet cli sounds promising. So it might just be an issue with tool/sdk versions, system configuration then? In case it helps, i'm using VS2022 Enterprise (v17.2.0) and here's the --info output from dotnet:
|
I believe I have found the issue.
This basically loads DefaultDocumentation.Markdown a second time alongside the one already loaded from the project reference. So now
should fix it. |
I seem to have encountered a strange bug, where the FileNameFactories aren't loading properly.
I've imported the NuGet package into my project:
I'm leaving all configuration set to default for now. But upon building the application, it throws (paths shortened):
Poking around the source code, I can see in
Generator.cs
line 118 that it's supposed to be loading all theavailabletypes
:... and then in
Context.cs
line 19 it's sorting through them to find the specifiedFileNameFactory
:But I can't tell where the code would be failing to find the
IFileNameFactory
types. It all looks good to me. There must be some edge case I've stumbled on, where it's not working. My repo is a monorepo structure, so it's a bit different than a standard repo layout; and perhaps something in the way it's configured is the culprit.I need to track this down, but I don't know how to go about debugging it further. I'd be happy to work with you, if you have any ideas.
The text was updated successfully, but these errors were encountered: