Skip to content
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

Documenting a net8.0 project when using msbuild.exe #1052

Open
Zastai opened this issue Apr 12, 2024 · 0 comments
Open

Documenting a net8.0 project when using msbuild.exe #1052

Zastai opened this issue Apr 12, 2024 · 0 comments

Comments

@Zastai
Copy link

Zastai commented Apr 12, 2024

I am running into the following issue:

  • I have a Sandcastle project documenting a C# project targeting net6.0 and net8.0, with several NuGet packages in use
  • the Sandcastle tools are brought in from NuGet
  • when using dotnet build, this works fine
  • when using msbuild.exe however, the GenerateReflectionInfo step fails with
    SHFB : error BE0043: Unexpected error detected in last build step. See build log for details.
    • the log has MRefBuilder : error : Unresolved assembly reference: <assembly name for dependency from NuGet package> required by <assembly being documented

It looks like SHFB is applying a .NET Framework style dependency resolution (which would require all dependencies to be in the same folder) to a .NET library (which has a My.Assembly.deps.json alongside My.Assembly.dll file describing where dependencies are located).

I would love to leave the old .NET Framework implementation of MSBuild behind, but unfortunately, Visual Studio still uses that one, so it needs to work too.

Setting CopyLocalLockFileAssemblies to true in the project being documented resolves this error, but is not a solution - it's highly undesirable to duplicate dependency DLLs all over the place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant