Bug 30502 - AssemblyName.CultureName implementation differs from .NET.
Summary: AssemblyName.CultureName implementation differs from .NET.
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: marcos.henrich
URL:
Depends on:
Blocks:
 
Reported: 2015-05-27 12:26 UTC by marcos.henrich
Modified: 2015-05-28 05:52 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description marcos.henrich 2015-05-27 12:26:40 UTC
.NET has a different implementation of AssemblyName.CultureName.

This causes failures in Roslyn while comparing assemblies and references culture names.
Roslyn assumes that some assemblies loaded from data have no culture name, while mono implementation of AssemblyName.CultureName would return "neutral".
Comment 1 marcos.henrich 2015-05-28 05:50:38 UTC
To reproduce:

[Test]
public void CultureNameInvariant ()
{
	var an = new AssemblyName ("TestDll");
	an.CultureInfo = new CultureInfo (CultureInfo.InvariantCulture.LCID);

	Assert.AreEqual ("", an.CultureName);
}
Comment 2 marcos.henrich 2015-05-28 05:52:09 UTC
The pull request for this issue can be found in the link below.
https://github.com/mono/mono/pull/1838
Comment 3 marcos.henrich 2015-05-28 05:52:51 UTC
Fixed in master 221d1acb3a8bebfe764486cd86f52f2b0ecb27dd.
https://github.com/mono/mono/commit/221d1acb3a8bebfe764486cd86f52f2b0ecb27dd