Skip to content

Remove irrelevant section from trimming docs #24962

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

Merged
merged 1 commit into from
Jul 2, 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
33 changes: 0 additions & 33 deletions docs/core/deploying/trim-self-contained.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,39 +36,6 @@ When the code is indirectly referencing an assembly through reflection, you can
</ItemGroup>
```

### Support for SSL certificates

If your app loads SSL certificates, such as in an ASP.NET Core app, you'll want to ensure that when trimming you prevent trimming assemblies that will help with loading SSL certificates.

We can update our project file to include the following for ASP.NET Core 3.1:

```xml
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>...</PropertyGroup>
<!--Include the following for .aspnetcore 3.1-->
<ItemGroup>
<TrimmerRootAssembly Include="System.Net" />
<TrimmerRootAssembly Include="System.Net.Security" />
<TrimmerRootAssembly Include="System.Security" />
</ItemGroup>
...
</Project>
```

If we're using .Net 5.0, we can update our project file to include the following:

```xml
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>...</PropertyGroup>
<!--Include the following for .net 5.0-->
<ItemGroup>
<TrimmerRootAssembly Include="System.Net.Security" />
<TrimmerRootAssembly Include="System.Security" />
</ItemGroup>
...
</Project>
```

## Trim your app - CLI

Trim your application using the [dotnet publish](../tools/dotnet-publish.md) command. When you publish your app, set the following properties:
Expand Down