<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:41:43 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-2138] Support ISupportInitialize when targeting .NET standard 1.5</title>
                <link>https://jira.mongodb.org/browse/CSHARP-2138</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;We are migrating a project to ASP.net core where we have POCOs beeing deserialized that implement ISupportInitialize&lt;/p&gt;

&lt;p&gt;Looking at the driver source (&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/blob/v2.5.0/src/MongoDB.Bson/Serialization/Serializers/BsonClassMapSerializer.cs&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/blob/v2.5.0/src/MongoDB.Bson/Serialization/Serializers/BsonClassMapSerializer.cs&lt;/a&gt;), this isn&apos;t supported in .net standard. &lt;/p&gt;

&lt;p&gt;I looked around and couldn&apos;t find a reason for this. Can you guys include it again?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</description>
                <environment>.NET standard</environment>
        <key id="479168">CSHARP-2138</key>
            <summary>Support ISupportInitialize when targeting .NET standard 1.5</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="13201">Fixed</resolution>
                                        <assignee username="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="sergio.costa">Sergio Costa</reporter>
                        <labels>
                    </labels>
                <created>Fri, 5 Jan 2018 14:19:44 +0000</created>
                <updated>Sat, 28 Oct 2023 11:49:10 +0000</updated>
                            <resolved>Wed, 16 Oct 2019 14:42:52 +0000</resolved>
                                    <version>2.5</version>
                                    <fixVersion>2.9.3</fixVersion>
                                    <component>Serialization</component>
                                        <votes>6</votes>
                                    <watches>15</watches>
                                                                                                                <comments>
                            <comment id="2484838" author="willian.gruber@hotmail.com" created="Wed, 16 Oct 2019 15:01:01 +0000"  >&lt;p&gt;Thank you for the fix!&lt;/p&gt;</comment>
                            <comment id="2484803" author="rstam" created="Wed, 16 Oct 2019 14:44:49 +0000"  >&lt;p&gt;We added support for `ISupportInitialize` when targeting .NET Standard 1.5 using reflection.&lt;/p&gt;

&lt;p&gt;Later when we target .NET Standard 2.0 or above we won&apos;t need to use reflection because .NET Standard 2.0 and above include the `ISupportInitialize` interface.&lt;/p&gt;</comment>
                            <comment id="2484802" author="ted.francis@zonal.co.uk" created="Wed, 16 Oct 2019 14:44:46 +0000"  >&lt;p&gt;Thanks VERY much for the fast turnaround on this issue, Robert!&lt;/p&gt;</comment>
                            <comment id="2484793" author="xgen-internal-githook" created="Wed, 16 Oct 2019 14:40:44 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;rstam&apos;, &apos;email&apos;: &apos;robert@robertstam.org&apos;, &apos;name&apos;: &apos;rstam&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-2138&quot; title=&quot;Support ISupportInitialize when targeting .NET standard 1.5&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-2138&quot;&gt;&lt;del&gt;CSHARP-2138&lt;/del&gt;&lt;/a&gt;: Support ISupportInitialize when targeting .NET standard 1.5.&lt;br/&gt;
Branch: v2.9.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/e36efc98b80aead45263a70eb6c0ea07cf5512d3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/e36efc98b80aead45263a70eb6c0ea07cf5512d3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2484754" author="xgen-internal-githook" created="Wed, 16 Oct 2019 14:34:54 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;rstam&apos;, &apos;email&apos;: &apos;robert@robertstam.org&apos;, &apos;name&apos;: &apos;rstam&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-2138&quot; title=&quot;Support ISupportInitialize when targeting .NET standard 1.5&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-2138&quot;&gt;&lt;del&gt;CSHARP-2138&lt;/del&gt;&lt;/a&gt;: Support ISupportInitialize when targeting .NET standard 1.5.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/794058d10e4f08ec39a8438311ad8bc6a632ff74&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/794058d10e4f08ec39a8438311ad8bc6a632ff74&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2480111" author="willian.gruber@hotmail.com" created="Mon, 14 Oct 2019 13:37:38 +0000"  >&lt;p&gt;Thank you Robert Stam!&lt;/p&gt;

&lt;p&gt;By the way, I am using Core 3.0.&lt;/p&gt;</comment>
                            <comment id="2479396" author="rstam" created="Mon, 14 Oct 2019 01:23:11 +0000"  >&lt;p&gt;At this point we are not ready to change the minimum required framework versions.&lt;/p&gt;

&lt;p&gt;We are investigating an approach using reflection to support `ISupportInitialize` without changing the minimum required framework versions.&lt;/p&gt;</comment>
                            <comment id="2478463" author="willian.gruber@hotmail.com" created="Fri, 11 Oct 2019 18:47:08 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;My project depends on this functionality too.&lt;/p&gt;

&lt;p&gt;Can you please recheck the minimum requirement and update the serializer?&lt;/p&gt;

&lt;p&gt;Thank you&lt;/p&gt;

&lt;p&gt;(By the way, just saw Ted Francis&apos;s and Christopher Sena&apos;s posts dates, and although they are the same as mine, I do not know them. Which means this problem affects many projects)&lt;/p&gt;</comment>
                            <comment id="2477778" author="chrissena87@gmail.com" created="Fri, 11 Oct 2019 13:12:42 +0000"  >&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I&apos;m desperate for this to be resolved.&#160;&lt;/p&gt;

&lt;p&gt;This issue is preventing my project from progressing. Any update on progress would be great as it&apos;s been almost 2 years now.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                            <comment id="2477754" author="ted.francis@zonal.co.uk" created="Fri, 11 Oct 2019 13:04:12 +0000"  >&lt;p&gt;Hi there. Same issue for me.&#160; Have migrated our application from .NET 4.6.2 to .NET Standard 2.0 and all of our data migration code has stopped working because of this issue.&lt;/p&gt;</comment>
                            <comment id="2422473" author="mongodb@softwarea.de" created="Tue, 17 Sep 2019 04:50:28 +0000"  >&lt;p&gt;Hi Federico, are you saying that ISupportInitialize is working for .NET Standard 2.0 (but not for 2.1 so far)? Can&apos;t try this currently, because I&apos;m on a trip. But I could easily step back to 2.0 if that helps ...&lt;/p&gt;</comment>
                            <comment id="2421628" author="federicoce@moravia.com" created="Mon, 16 Sep 2019 16:02:03 +0000"  >&lt;p&gt;I noticed you&apos;re aiming to target .NETStandard 2.0 in v2.10, would it be possible to also include this? It&apos;s just a tweak to a couple of #ifs &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/wink.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="2421476" author="mongodb@softwarea.de" created="Mon, 16 Sep 2019 14:59:51 +0000"  >&lt;p&gt;Hello guys, any news here? I am using .NET Standard 2.1 and C# Driver 2.9.1.&#160;&lt;/p&gt;

&lt;p&gt;I feel like there has been no progress so far? &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/sad.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="2017495" author="thomas.karbe@beeware.de" created="Fri, 28 Sep 2018 14:39:50 +0000"  >&lt;p&gt;Same issue over here.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Im currently looking for some logic to enable silent deployment in our CI Pipeline. I think, when we put some feature Toggles and this logic together well have it.&lt;/p&gt;</comment>
                            <comment id="1923283" author="rstam" created="Mon, 18 Jun 2018 13:39:47 +0000"  >&lt;p&gt;We do intend to target .NET Standard 2.0 soon.&lt;/p&gt;

&lt;p&gt;We will either increase our minimum required .NET Standard version from 1.5 to 2.0, or we will add a third targeted framework (.NET Standard 2.0) to our currently targeted frameworks (.NET Framework 4.5 and .NET Standard 1.5).&lt;/p&gt;

&lt;p&gt;We need to update our build process a bit first to make it easier to target multiple frameworks.&lt;/p&gt;</comment>
                            <comment id="1923281" author="ofiris" created="Mon, 18 Jun 2018 13:34:27 +0000"  >&lt;p&gt;Robert, must of the community have updated to .NET Standard 2.0, what are the chances you will accept Liviu&apos;s suggestion to target multi-platforms? &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;</comment>
                            <comment id="1920424" author="ibode" created="Thu, 14 Jun 2018 07:15:07 +0000"  >&lt;p&gt;If there is any chance: I would love to have&#160;ISupportInitialize support in .NET Standard 2.0 as well.&#160;&lt;/p&gt;</comment>
                            <comment id="1876079" author="rstam" created="Fri, 27 Apr 2018 13:42:22 +0000"  >&lt;p&gt;We currently target two frameworks:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;.NET Framework 4.5&lt;/li&gt;
	&lt;li&gt;.NET Standard 1.5&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;We certainly could target multiple versions of .NET Standard. It just so happens that this is the first time there has been a possible need to target multiple versions of .NET Standard. Thank you for the suggestion.&lt;/p&gt;</comment>
                            <comment id="1875849" author="liviu_rezmerita@dellteam.com" created="Fri, 27 Apr 2018 06:57:03 +0000"  >&lt;p&gt;Can you please explain why you can&apos;t target multiple .net standard versions?&lt;br/&gt;
Why can&apos;t you create a multi-targeting project with &amp;lt;TargetFrameworks&amp;gt;netstandard1.5;netstandard2.0;net45&amp;lt;/TargetFrameworks&amp;gt; ,define dependencies for each targeting framework and add corresponding #if preprocessor directives in code?&lt;/p&gt;

&lt;p&gt;Please provide a workaround for managing schema changes on .net core and mention this limitation in the &lt;a href=&quot;http://mongodb.github.io/mongo-csharp-driver/2.5/reference/bson/mapping/schema_changes/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;documentation&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="1874916" author="rstam" created="Thu, 26 Apr 2018 14:37:28 +0000"  >&lt;p&gt;We currently only require .NET Standard 1.5. ISupportInitialize was not added to .NET Standard until version 2.0.&lt;/p&gt;

&lt;p&gt;If we change the minimum requirement to .NET Standard 2.0 we would restrict the frameworks our driver could run on to only those frameworks that are new enough to support .NET Standard 2.0.&lt;/p&gt;

&lt;p&gt;So the real issue here is when do we increase our minimum .NET Standard version and to what? It&apos;s a trade off between gaining access to new features and abandoning users who still run on older frameworks.&lt;/p&gt;</comment>
                            <comment id="1874740" author="liviu_rezmerita@dellteam.com" created="Thu, 26 Apr 2018 10:31:36 +0000"  >&lt;p&gt;This issue hasn&apos;t been fixed in &lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/blob/v2.5.1/src/MongoDB.Bson/Serialization/Serializers/BsonClassMapSerializer.cs&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;v2.5.1&lt;/a&gt; either.&lt;br/&gt;
Robert, why don&apos;t you update the #if preprocessor directive to include .net core 2?&lt;/p&gt;

&lt;p&gt;#if (NET45 || NETSTANDARD2_0 || NETCOREAPP2_0)&lt;br/&gt;
 ISupportInitialize supportsInitialization = null;&lt;br/&gt;
#endif&lt;/p&gt;</comment>
                            <comment id="1768235" author="rstam" created="Mon, 8 Jan 2018 21:33:46 +0000"  >&lt;p&gt;It should be easy to add support back for &lt;tt&gt;ISupportInitialize&lt;/tt&gt;. It would just be a matter of removing some &lt;tt&gt;#ifs&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;A pull request for this would be welcome, but as I mentioned above the unanswered question is whether it is OK to require all our users to upgrade to .NET Core 2.0 to use the next release of the driver. So the timing of when the pull request might be merged could be a little further in the future.&lt;/p&gt;</comment>
                            <comment id="1767766" author="sergio.costa" created="Mon, 8 Jan 2018 16:53:02 +0000"  >&lt;p&gt;Hi Robert, thanks for your response.&lt;/p&gt;

&lt;p&gt;If we provide a PR for this would you consider it for the next driver release? &lt;/p&gt;</comment>
                            <comment id="1766088" author="rstam" created="Fri, 5 Jan 2018 15:14:42 +0000"  >&lt;p&gt;At the time we first ported the driver to .NET Core the ISupportInitialize interface was not supported by .NET Core.&lt;/p&gt;

&lt;p&gt;Looking at apisof.net it appears that ISupportInitialize is now supported in .NET Core 2.0 (and .NET Standard 2.0).&lt;/p&gt;

&lt;p&gt;We currently target .NET Framework 4.5 and .NET Standard 1.5. To add support for ISupportInitialize (in .NET Core) we would have to increase our minimum required .NET Standard version to 2.0. I&apos;m not sure yet whether requiring 2.0 is viable, or whether many of our users aren&apos;t yet ready to move to .NET Core 2.0.&lt;/p&gt;

&lt;p&gt;Thanks for bringing this up. At some point we will definitely figure out how (and when) to bring back support for this in .NET Core.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="513454">CSHARP-2220</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <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|htexk7:</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>