为各项目添加支持 IsTrimmable
和 IsAotCompatible
的框架以及属性
#2008
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
在此 PR 之前,因为多数项目仅面向较旧的框架版本(
net46
,netstandard2.0
等),这导致我们无法在项目中启用裁剪兼容性检查器
(IsTrimmable=true
)以及AOT兼容性检查器
(IsAotCompatible=true
),此 PR 为这些项目添加了这些框架(...;net6.0;net7.0
),并在项目中启用了这两种检查器;现在,在执行项目构建时,对应的项目会正确回报对裁剪、AOT不兼容API的调用。此 PR 为解决 #2007 的前置条件,因为仅靠在较新框架上发布应用程序并不能涵盖所有API的使用。