1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-08 03:27:04 +09:00

Replace TargetFrameworks with TargetFramework where possible (#66198)

This commit is contained in:
Jan Kotas 2022-03-04 22:21:59 -08:00 committed by GitHub
parent 65bdc90765
commit 17662fc30c
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
78 changed files with 85 additions and 85 deletions

View file

@ -79,16 +79,16 @@ To include an analyzer in a package, simply add an `AnalyzerReference` item to t
In the analyzer project make sure to do the following. Ensure it only targets `netstandard2.0` since this is a requirement of the compiler. Enable localization by setting `UsingToolXliff`. Set the `AnalyzerLanguage` property to either `cs` or `vb` if the analyzer is specific to that language. By default the analyzer will be packaged as language-agnostic. Avoid any dependencies in Analyzer projects that aren't already provided by the compiler.
```xml
<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<UsingToolXliff>true</UsingToolXliff>
<AnalyzerLanguage>cs</AnalyzerLanguage>
<AnalyzerLanguage>cs</AnalyzerLanguage>
</PropertyGroup>
```
In order to mitigate design-time/build-time performance issues with source generators, we generate build logic to allow the end user to disable the source generator from the package. By default, the MSBuild property an end user can set is named `Disable{PackageId}SourceGenerator`. If a package needs a custom property name, this can be overriden by setting the following property in the project that produces the package
```xml
<PropertyGroup>
<DisableSourceGeneratorPropertyName>CustomPropertyName</DisableSourceGeneratorPropertyName>
<PropertyGroup>
<DisableSourceGeneratorPropertyName>CustomPropertyName</DisableSourceGeneratorPropertyName>
</PropertyGroup>
```