Skip to content

NEST requires explicit installation of System.Diagnostics.DiagnosticSource nuget. #3945

Closed
@LbISS

Description

@LbISS

NEST/Elasticsearch.Net version:
7.0.1
Elasticsearch version:
7.2.0
Description of the problem including expected versus actual behavior:
In case of any issues in request to elastic search if no System.Diagnostics.DiagnosticSource installed in project explicitly then UnexpectedElasticsearchClientException is thrown instead of correct exception.
If explicitly add System.Diagnostics.DiagnosticSource v4.5.1(or later) in project then behavior is correct. System.Diagnostics.DiagnosticSource doesn't install automatically with the NEST package.

Steps to reproduce:

  1. Install NEST 7.0.1 on clean .Net standard 2.0 project.
  2. Send any request to elastic which produces error.

Provide DebugInformation (if relevant):
Elasticsearch.Net.UnexpectedElasticsearchClientException: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.3.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ---> System.IO.FileLoadException: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.3.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions