docfx icon indicating copy to clipboard operation
docfx copied to clipboard

Assembly's manifest definition does not match the assembly reference : System.Collections.Immutable, Version=1.2.3.0

Open ianceicys opened this issue 3 years ago • 2 comments

Operating System: (Windows or Linux or MacOS) Windows DocFX Version Used: DocFX 2.59.4 Template used: (default or statictoc or contain custom template) custom Steps to Reproduce:

  1. run docfx .\docfx.json

Expected Behavior: DocFx Site Builds successfully. Actual Behavior: PS C:\one\Simple> docfx .\docfx.json [22-09-12 03:09:17.990]Info:[BuildCommand]Plug-in directory: C:\ProgramData\chocolatey\bin\plugins_jkmo3qzs.4sc\plugins, configuration file: C:\ProgramData\chocolatey\bin\plugins_jkmo3qzs.4sc\plugins\docfx.plugins.config

[22-09-12 03:09:20.042]Info:[ImportPlugins]Searching custom plugins in directory C:\ProgramData\chocolatey\bin\plugins_jkmo3qzs.4sc\plugins..Error:[ImportPlugins]Error when get composition container: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information., loader exceptions: Could not load file or assembly 'System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040), Could not load file or assembly 'System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.

ianceicys avatar Sep 12 '22 15:09 ianceicys

@ianceicys Are you using custom plugins? The updated Microsoft.DocAsCode.Plugins requires System.Collections.Immutable (>= 5.0.0).

paulushub avatar Sep 12 '22 23:09 paulushub

We are also experiencing this issue with a slightly different error message:

Error:System.IO.FileLoadException: Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Custom plugins used are rest.tagpage and rest.operationpage.

cedar-ave avatar Sep 14 '22 20:09 cedar-ave

This is resolved in the latest version with a new library based plugin model, see this sample on using the member page plugin with the new approach.

yufeih avatar Jan 30 '23 13:01 yufeih