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:
parent
65bdc90765
commit
17662fc30c
78 changed files with 85 additions and 85 deletions
|
@ -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>
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue