Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

| | |
|---|---|
|Details|An error in the exception handling code for <xref:System.Windows.Media.ImageSourceConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object)> caused an incorrect <xref:System.NullReferenceException?displayProperty=name> to be thrown instead of the intended exception (e.g. <xref:System.IO.DirectoryNotFoundException?displayProperty=name>, <xref:System.IO.FileNotFoundException?displayProperty=name>), this change corrects that error so that the method now throws the right exception.By default all applications targeting .NET Framework 4.6.2 and below will continue to throw <xref:System.NullReferenceException?displayProperty=name> for compatibility, developers targeting .NET Framework 4.7 and above should see the right exceptions.// Replace the space with an 'x' if applicable|
|Suggestion|Developers who wish to revert to getting <xref:System.NullReferenceException?displayProperty=name> when targeting .NET Framework 4.7 can add/merge the following to their application's App.config file:<pre><code class="language-xml">&lt;configuration&gt;&#13;&#10;&lt;runtime&gt;&#13;&#10;&lt;AppContextSwitchOverrides value=&quot;Switch.System.Windows.Media.ImageSourceConverter.OverrideExceptionWithNullReferenceException=true&quot;/&gt;&#13;&#10;&lt;/runtime&gt;&#13;&#10;&lt;/configuration&gt;&#13;&#10;</code></pre>|
|Details|An error in the exception handling code for <xref:System.Windows.Media.ImageSourceConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext,System.Globalization.CultureInfo,System.Object)> caused an incorrect <xref:System.NullReferenceException?displayProperty=name> to be thrown instead of the intended exception (<xref:System.IO.DirectoryNotFoundException?displayProperty=name> or <xref:System.IO.FileNotFoundException?displayProperty=name>). This change corrects that error so that the method now throws the right exception. By default all applications targeting .NET Framework 4.6.2 and below will continue to throw <xref:System.NullReferenceException?displayProperty=name> for compatibility, developers targeting .NET Framework 4.7 and above should see the right exceptions.|
|Suggestion|Developers who wish to revert to getting <xref:System.NullReferenceException?displayProperty=name> when targeting .NET Framework 4.7 or later can add/merge the following to their application's App.config file:<pre><code class="language-xml">&lt;configuration&gt;&#13;&#10;&lt;runtime&gt;&#13;&#10;&lt;AppContextSwitchOverrides value=&quot;Switch.System.Windows.Media.ImageSourceConverter.OverrideExceptionWithNullReferenceException=true&quot;/&gt;&#13;&#10;&lt;/runtime&gt;&#13;&#10;&lt;/configuration&gt;&#13;&#10;</code></pre>|
|Scope|Edge|
|Version|4.7|
|Type|Retargeting|
Expand Down