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

Acrolinx 11/17 #27131

Merged
merged 2 commits into from
Nov 18, 2021
Merged
Show file tree
Hide file tree
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 @@ -45,7 +45,7 @@ Eventually, the entire facade layer corresponds to the new, modern implementatio

Multi-targeting is recommended for large apps that will be migrated over time and for teams applying the Strangler pattern approach. This approach can address `BindingRedirect` and package restoration challenges that surface from mixing [PackageReference](/nuget/consume-packages/package-references-in-project-files) and [packages.config](/nuget/reference/packages-config) restore styles. There are two options available for code that must run in both .NET Framework and .NET Core environments.

* Preprocessor [`#if` in C#](../../csharp/language-reference/preprocessor-directives.md#conditional-compilation) (or [`#If` in Visual Basic]([preprocessor `#if`](/dotnet/visual-basic/reference/language-specification/preprocessing-directives#conditional-compilation)) directives allow you to implement different functionality or use different dependencies when run in .NET Framework versus .NET Core.
* Preprocessor directives ([#if in C#](../../csharp/language-reference/preprocessor-directives.md#conditional-compilation) or [#If in Visual Basic](/dotnet/visual-basic/reference/language-specification/preprocessing-directives#conditional-compilation)) allow you to implement different functionality or use different dependencies when run in .NET Framework versus .NET Core.

* Project files can use conditional [globbing patterns](../../core/project-sdk/overview.md#default-includes-and-excludes), such as `*.core.cs`, to include different sets of files based on which framework is being targeted.

Expand Down
7 changes: 2 additions & 5 deletions docs/core/deploying/trimming/trim-warnings/il2007.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@ An assembly specified in a descriptor file could not be resolved.

## Rule description

[Descriptor files](https://github.com/mono/linker/blob/main/docs/data-formats.md) are
used to instruct the trimmer to always keep certain items in an assembly, regardless of
whether the trimmer could find any references to them.
[Descriptor files](https://github.com/mono/linker/blob/main/docs/data-formats.md) are used to instruct the trimmer to always keep certain items in an assembly, regardless of whether the trimmer could find any references to them.

The assembly specified in the descriptor file by its full name could not be found in any
of the assemblies seen by the trimmer.
The assembly specified in the descriptor file by its full name could not be found in any of the assemblies seen by the trimmer.

## Example

Expand Down
10 changes: 4 additions & 6 deletions docs/core/deploying/trimming/trim-warnings/il2023.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ element when putting an attribute on the return parameter of a method.

[Custom attribute annotation files](https://github.com/mono/linker/blob/main/docs/data-formats.md#custom-attributes-annotations-format)
are used to instruct the trimmer to behave as if the specified item has a given
attribute. Attribute annotations can only be used to add attributes which have effect on
the trimmer behavior, all other attributes will be ignored. Attributes added via
attribute annotations only influence the trimmer behavior and they are never added to the
output assembly.
attribute. Attribute annotations can only be used to add attributes that have effect on
the trimmer behavior. All other attributes are ignored. Attributes added via
attribute annotations only influence the trimmer behavior, and they are never added to the output assembly.

A `method` element has more than one `return` element specified. Trimmer only allows one
attribute annotation on the retun type of a given method.
A `method` element has more than one `return` element specified. Trimmer only allows one attribute annotation on the return type of a given method.

## Example

Expand Down
10 changes: 4 additions & 6 deletions docs/core/deploying/trimming/trim-warnings/il2029.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ argument `fullname` or its value is an empty string.

[Custom attribute annotation files](https://github.com/mono/linker/blob/main/docs/data-formats.md#custom-attributes-annotations-format)
are used to instruct the trimmer to behave as if the specified item has a given
attribute. Attribute annotations can only be used to add attributes which have effect on
the trimmer behavior, all other attributes will be ignored. Attributes added via
attribute annotations only influence the trimmer behavior and they are never added to the
output assembly.
attribute. Attribute annotations can only be used to add attributes that have effect on
the trimmer behavior. All other attributes are ignored. Attributes added via
attribute annotations only influence the trimmer behavior, and they're never added to the output assembly.

All `attribute` elements must have the required `fullname` argument and its value cannot
be an empty string.
All `attribute` elements must have the required `fullname` argument and its value cannot be an empty string.

## Example

Expand Down