Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SatelliteResourceLanguages property #26171

Merged
merged 3 commits into from
Sep 17, 2021
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
14 changes: 14 additions & 0 deletions docs/core/project-sdk/msbuild-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ The following MSBuild properties are documented in this section:
- [RuntimeFrameworkVersion](#runtimeframeworkversion)
- [RuntimeIdentifier](#runtimeidentifier)
- [RuntimeIdentifiers](#runtimeidentifiers)
- [SatelliteResourceLanguages](#satelliteresourcelanguages)
- [UseAppHost](#useapphost)

### AppendTargetFrameworkToOutputPath
Expand Down Expand Up @@ -396,6 +397,19 @@ The `RuntimeIdentifiers` property lets you specify a semicolon-delimited list of
</PropertyGroup>
```

## SatelliteResourceLanguages

The `SatelliteResourceLanguages` property lets you specify which languages you want to preserve satellite resource assemblies for during build and publish. Many NuGet packages include localized resource satellite assemblies in the main package. For projects that reference these NuGet packages that don't require localized resources, the localized assemblies can unnecessarily inflate the build and publish output size. By adding the `SatelliteResourceLanguages` property to your project file, only localized assemblies for the languages you specify will be included in the build and publish output. For example, in the following project file, only English (US) resource satellite assemblies will be retained.

```xml
<PropertyGroup>
<SatelliteResourceLanguages>en-US</SatelliteResourceLanguages>
</PropertyGroup>
```

> [!NOTE]
> You must specify this property in the project that references the NuGet package with localized resource satellite assemblies.

### UseAppHost

The `UseAppHost` property controls whether or not a native executable is created for a deployment. A native executable is required for self-contained deployments.
Expand Down