Skip to content

Commit 93a89d9

Browse files
committed
Fix doc comment
1 parent 740a7e2 commit 93a89d9

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@ This open-source project provides a NuGet package, dotnetCampus.LatestCSharpFeat
1414

1515
Simply install the dotnetCampus.LatestCSharpFeatures NuGet package.
1616

17-
If you want these new language features to also be effective for other projects that reference this project, you can add a conditional compilation symbol in the csproj file:
18-
1917
```xml
2018
<!-- By default, dotnetCampus.LatestCSharpFeatures introduces C# new features as internal modifiers into the current project.
2119
Using this conditional compilation symbol, you can set these types as public, so that other projects referencing this project can also use these new features. -->
20+
<PackageReference Include="dotnetCampus.LatestCSharpFeatures" Version="12.0.0" PrivateAssets="all" />
21+
```
22+
23+
If you want these new language features to also be effective for other projects that reference this project, you can add a conditional compilation symbol in the csproj file:
24+
25+
```xml
26+
<!-- By default, dotnetCampus.LatestCSharpFeatures introduces new C# features into the current project using the internal modifier.
27+
By using this conditional compilation symbol, these types can be set to public, allowing other projects referencing this project to also use these new features. -->
2228
<DefineConstants>$(DefineConstants);USE_PUBLIC_LATEST_CSHARP_FEATURES</DefineConstants>
2329
```
2430

docs/README.zh-CHT.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@
1414

1515
直接安裝 dotnetCampus.LatestCSharpFeatures NuGet 包即可。
1616

17-
如果您希望這些新語言特性對其他引用了此項目的項目也生效,可以在 csproj 文件中增加一個條件編譯符:
18-
1917
```xml
2018
<!-- 由於 dotnetCampus.LatestCSharpFeatures 只含源生成器,因此不會引入任何運行時依賴項。
2119
我們可以將其設置為 PrivateAssets="all",以避免將其傳遞給其他項目。 -->
20+
<PackageReference Include="dotnetCampus.LatestCSharpFeatures" Version="12.0.0" PrivateAssets="all" />
21+
```
22+
23+
如果您希望這些新語言特性對其他引用了此項目的項目也生效,可以在 csproj 文件中增加一個條件編譯符:
24+
25+
```xml
26+
<!-- 預設情況下,dotnetCampus.LatestCSharpFeatures 會將 C# 新特性以 internal 修飾符引入當前項目。
27+
使用此條件編譯符,可以將這些類型設為 public,使得引用此項目的其他項目也能使用這些新特性。 -->
2228
<DefineConstants>$(DefineConstants);USE_PUBLIC_LATEST_CSHARP_FEATURES</DefineConstants>
2329
```
2430

0 commit comments

Comments
 (0)