<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:41:42 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-2135] Issue with MongoDB.Driver.Core dll version 2.5</title>
                <link>https://jira.mongodb.org/browse/CSHARP-2135</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Hello Support,&lt;/p&gt;

&lt;p&gt;I have trying to make MongoDB work on my system since a week now. I didnt not find any better solution to resolve the issue.Hence I am hoping the issue can be resolved here.,\&lt;/p&gt;

&lt;p&gt;We are trying to build a module and use the MongoDB as the directory for the module inputs. Hence we have installed the latest version of Mongo DB dlls from Nuget Package manager, we got 2.5 version of Bson, Core and Driver dlls. Along these, 4.3.0 version of Interop services have been installed. &lt;/p&gt;

&lt;p&gt;However when I try to make a connection via code, I get the following error.&lt;/p&gt;

&lt;p&gt;Could not load file or assembly &apos;System.Runtime.InteropServices.RuntimeInformation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The located assembly&apos;s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) . &lt;/p&gt;

&lt;p&gt;Failing at the below highlighted line.&lt;/p&gt;


&lt;p&gt;Code snippet:&lt;/p&gt;

&lt;p&gt;   List&amp;lt;BsonDocument&amp;gt; oList = new List&amp;lt;BsonDocument&amp;gt;();&lt;br/&gt;
            try&lt;br/&gt;
            {&lt;br/&gt;
              &lt;font color=&quot;red&quot;&gt;  IMongoClient client = new MongoClient(&quot;mongodb://RedirectUser:brother@ambriig1:27017/Redirect&quot;);&lt;/font&gt;&lt;br/&gt;
                IMongoDatabase database = client.GetDatabase(&quot;Redirect&quot;);&lt;br/&gt;
                IMongoCollection&amp;lt;BsonDocument&amp;gt; collection = database.GetCollection&amp;lt;BsonDocument&amp;gt;(&quot;Urls&quot;);&lt;br/&gt;
                BsonDocument Filter = new BsonDocument(&quot;OldURL&quot;, path);&lt;br/&gt;
                 oList = collection.Find(Filter).ToList();&lt;br/&gt;
                return oList;&lt;br/&gt;
            }&lt;/p&gt;

&lt;p&gt;package config looks like:&lt;/p&gt;

&lt;p&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br/&gt;
&amp;lt;packages&amp;gt;&lt;br/&gt;
  &amp;lt;package id=&quot;DnsClient&quot; version=&quot;1.0.7&quot; targetFramework=&quot;net452&quot; /&amp;gt;&lt;br/&gt;
  &amp;lt;package id=&quot;mongocsharpdriver&quot; version=&quot;2.5.0&quot; targetFramework=&quot;net452&quot; /&amp;gt;&lt;br/&gt;
  &amp;lt;package id=&quot;MongoDB.Bson&quot; version=&quot;2.5.0&quot; targetFramework=&quot;net452&quot; /&amp;gt;&lt;br/&gt;
  &amp;lt;package id=&quot;MongoDB.Driver&quot; version=&quot;2.5.0&quot; targetFramework=&quot;net452&quot; /&amp;gt;&lt;br/&gt;
  &amp;lt;package id=&quot;MongoDB.Driver.Core&quot; version=&quot;2.5.0&quot; targetFramework=&quot;net452&quot; /&amp;gt;&lt;br/&gt;
  &amp;lt;package id=&quot;System.Buffers&quot; version=&quot;4.3.0&quot; targetFramework=&quot;net452&quot; /&amp;gt;&lt;br/&gt;
  &amp;lt;package id=&quot;System.Runtime.InteropServices.RuntimeInformation&quot; version=&quot;4.3.0&quot; targetFramework=&quot;net452&quot; /&amp;gt;&lt;br/&gt;
&amp;lt;/packages&amp;gt;&lt;/p&gt;</description>
                <environment>Visual Studio 2015, 4.5.2 .Net framework, MongoDB 2.5 version, Windows 10</environment>
        <key id="476739">CSHARP-2135</key>
            <summary>Issue with MongoDB.Driver.Core dll version 2.5</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="3">Duplicate</resolution>
                                        <assignee username="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="supadrasta">Sudha Upadrasta</reporter>
                        <labels>
                            <label>2.5</label>
                            <label>Bug</label>
                            <label>MongoClient</label>
                    </labels>
                <created>Thu, 28 Dec 2017 17:11:53 +0000</created>
                <updated>Fri, 16 Feb 2018 19:34:19 +0000</updated>
                            <resolved>Tue, 9 Jan 2018 19:19:19 +0000</resolved>
                                    <version>2.5</version>
                                    <fixVersion>2.7.0</fixVersion>
                                    <component>API</component>
                    <component>Connectivity</component>
                                        <votes>1</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1808392" author="supadrasta" created="Fri, 16 Feb 2018 19:34:19 +0000"  >&lt;p&gt;Thank you will wait 2.6 Thanks, Sudha&lt;/p&gt;</comment>
                            <comment id="1771928" author="rstam" created="Thu, 11 Jan 2018 19:22:03 +0000"  >&lt;p&gt;Steps to reproduce would be helpful but not required.&lt;/p&gt;

&lt;p&gt;We know that we are depending on an older version of System.Runtime.InteropServices.RuntimeInformation and we fully expect updating our dependency to the current version would take care of this.&lt;/p&gt;

&lt;p&gt;This change will be in 2.6, but we don&apos;t yet have a release date for 2.6.&lt;/p&gt;</comment>
                            <comment id="1771922" author="supadrasta" created="Thu, 11 Jan 2018 19:18:25 +0000"  >&lt;p&gt;You still wants steps to reproduce? It is really annoying that I am not able to debug on my loca.&lt;/p&gt;

&lt;p&gt;I have created a ClassLibrary and target framework is 4.52&lt;/p&gt;

&lt;p&gt;When can I expect a fix for this. Please asvise&lt;/p&gt;</comment>
                            <comment id="1762919" author="rstam" created="Tue, 2 Jan 2018 16:16:57 +0000"  >&lt;p&gt;I did not get this error when creating new test programs in Visual Studio 2017. I was able to target either .NET Framework 4.5 or .NET Core 2.0.&lt;/p&gt;

&lt;p&gt;Can you tell me how you created your project and I can attempt to reproduce again?&lt;/p&gt;

&lt;p&gt;There is a potential issues with depending on different versions of System.Runtime.InteropServices.RuntimeInformation. The driver depends on version 4.0.0 but DnsClient (which we also depend on) depends on version 4.3.0. We did not realize that there was an indirect dependency on a newer version of System.Runtime.InteropServices.RuntimeInformation.&lt;/p&gt;

&lt;p&gt;The most likely fix is to update the driver to depend on version 4.3.0 instead of 4.0.0, that way all direct and indirect dependencies will be on the same version.&lt;/p&gt;</comment>
                            <comment id="1760885" author="supadrasta" created="Thu, 28 Dec 2017 17:15:45 +0000"  >&lt;p&gt;The same logic works fine for my colleague, who has Windows 7. Apart from that both our set up match. &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="418200">CSHARP-2033</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="174395" name="mongoerror.png" size="39716" author="supadrasta" created="Thu, 28 Dec 2017 17:14:08 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htejk7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>