Assembly.GetSatelliteAssembly Method

Definition

Gets the satellite assembly.

Overloads

GetSatelliteAssembly(CultureInfo, Version)

Gets the specified version of the satellite assembly for the specified culture.

GetSatelliteAssembly(CultureInfo)

Gets the satellite assembly for the specified culture.

GetSatelliteAssembly(CultureInfo, Version)

Source:
Assembly.cs
Source:
Assembly.cs
Source:
Assembly.cs

Gets the specified version of the satellite assembly for the specified culture.

C#
public virtual System.Reflection.Assembly GetSatelliteAssembly(System.Globalization.CultureInfo culture, Version? version);
C#
public virtual System.Reflection.Assembly GetSatelliteAssembly(System.Globalization.CultureInfo culture, Version version);
C#
public System.Reflection.Assembly GetSatelliteAssembly(System.Globalization.CultureInfo culture, Version version);

Parameters

culture
CultureInfo

The specified culture.

version
Version

The version of the satellite assembly.

Returns

The specified satellite assembly.

Implements

Exceptions

culture is null.

The satellite assembly with a matching file name was found, but the CultureInfo or the version did not match the one specified.

The assembly cannot be found.

The satellite assembly is not a valid assembly.

Remarks

Satellite assemblies contain localized resources, as distinct from main application assemblies, which contain non-localizable executable code and resources for a single culture that serve as the default or neutral culture.

Call the GetSatelliteAssembly(CultureInfo) overload to use your current assembly version.

If version is null, the current assembly version is used if both the resource and main assemblies are signed.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

GetSatelliteAssembly(CultureInfo)

Source:
Assembly.cs
Source:
Assembly.cs
Source:
Assembly.cs

Gets the satellite assembly for the specified culture.

C#
public virtual System.Reflection.Assembly GetSatelliteAssembly(System.Globalization.CultureInfo culture);
C#
public System.Reflection.Assembly GetSatelliteAssembly(System.Globalization.CultureInfo culture);

Parameters

culture
CultureInfo

The specified culture.

Returns

The specified satellite assembly.

Implements

Exceptions

culture is null.

The assembly cannot be found.

The satellite assembly with a matching file name was found, but the CultureInfo did not match the one specified.

The satellite assembly is not a valid assembly.

Remarks

Satellite assemblies contain localized resources, as distinct from main application assemblies, which contain non-localizable executable code and resources for a single culture that serve as the default or neutral culture.

Call this method to use your current assembly version.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1