Skip to content

Commit fba17bc

Browse files
authored
Merge pull request #9 from dotnet-campus/t/lvyi/DynamicallyAccessed
DynamicallyAccessed 实际上是 net5.0 开始的
2 parents 7cd1643 + f2034b4 commit fba17bc

7 files changed

Lines changed: 17 additions & 6 deletions

File tree

.github/workflows/dotnet-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
uses: actions/setup-dotnet@v1
1515
with:
1616
dotnet-version: |
17-
8.0.x
17+
9.0.x
1818
1919
- name: Build with dotnet
2020
run: dotnet build --configuration release

.github/workflows/nuget-tag-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/setup-dotnet@v1
1818
with:
1919
dotnet-version: |
20-
8.0.x
20+
9.0.x
2121
2222
- name: Install dotnet tool
2323
run: dotnet tool install -g dotnetCampus.TagToVersion
@@ -33,7 +33,7 @@ jobs:
3333
- name: Install Nuget
3434
uses: nuget/setup-nuget@v1
3535
with:
36-
nuget-version: '5.x'
36+
nuget-version: '6.x'
3737

3838
- name: Add private GitHub registry to NuGet
3939
run: |

DotNetCampus.LatestCSharpFeatures.sln

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{8A6F61D3
1111
LICENSE.txt = LICENSE.txt
1212
README.md = README.md
1313
build\Version.props = build\Version.props
14+
.github\workflows\dotnet-build.yml = .github\workflows\dotnet-build.yml
15+
.github\workflows\nuget-tag-publish.yml = .github\workflows\nuget-tag-publish.yml
1416
EndProjectSection
1517
EndProject
1618
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetCampus.LatestCSharpFeatures", "src\DotNetCampus.LatestCSharpFeatures\DotNetCampus.LatestCSharpFeatures.csproj", "{D0B0F7EB-3C81-45C4-BB47-5DCB16F2EA55}"

src/DotNetCampus.LatestCSharpFeatures.Analyzer/Generators/FeatureGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private void OnExecute(IncrementalGeneratorPostInitializationContext context)
2727
// .NET 5.0 才开始支持 ExternalInit。
2828
GenerateFeatureSource(context, "ExternalInit");
2929

30-
// .NET 6.0 才开始支持 DynamicallyAccessed
30+
// .NET 5.0 才开始支持 DynamicallyAccessed
3131
// 为低版本 .NET 生成对应代码,主要是简化编译多目标框架时的繁琐。
3232
GenerateFeatureSource(context, "DynamicallyAccessed");
3333

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "https://json.schemastore.org/launchsettings.json",
3+
"profiles": {
4+
"调试分析器": {
5+
"commandName": "DebugRoslynComponent",
6+
"targetProject": "../../tests/DotNetCampus.LatestCSharpFeatures.Tests/DotNetCampus.LatestCSharpFeatures.Tests.csproj"
7+
}
8+
}
9+
}

src/DotNetCampus.LatestCSharpFeatures/DynamicallyAccessed/DynamicallyAccessed.g.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#nullable enable
2-
#if !NET6_0_OR_GREATER
2+
#if !NET5_0_OR_GREATER
33

44
namespace System.Diagnostics.CodeAnalysis
55
{

tests/DotNetCampus.LatestCSharpFeatures.Tests/DotNetCampus.LatestCSharpFeatures.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net7.0;net6.0;net5.0;netcoreapp3.1;netcoreapp3.0;netstandard2.0;net48;net472;net471;net47;net462;net461;net46;net452;net451;net45;net40</TargetFrameworks>
4+
<TargetFrameworks>net9.0;net8.0;net7.0;net6.0;net5.0;netcoreapp3.1;netcoreapp3.0;netstandard2.0;net48;net472;net471;net47;net462;net461;net46;net452;net451;net45;net40</TargetFrameworks>
55
<ImplicitUsings>disable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<IsPackable>false</IsPackable>

0 commit comments

Comments
 (0)