Skip to content

Commit 5d226dd

Browse files
committed
修复 netstandard 1.0/1.6 无法使用 C# 新功能的问题(直接去掉对此框架的支持)
删除误打包误上传到 nuget.org 的 InternalUsageLibrary 库(已在 nuget.org 上标记了废弃) 修复 LatestCSharpFeatures 库编译后没有任何类的问题
1 parent 45ebaba commit 5d226dd

15 files changed

Lines changed: 16 additions & 46 deletions

File tree

dotnetCampus.LatestCSharpFeatures.sln

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.LatestCSharpFe
2727
EndProject
2828
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.Nullable.Source", "src\dotnetCampus.Nullable.Source\dotnetCampus.Nullable.Source.csproj", "{72163C73-CBC5-4CB5-BDDF-769B7AFD6FAB}"
2929
EndProject
30-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{19AD69CA-F593-4789-A51F-9E547033147D}"
31-
EndProject
32-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InternalUsageLibrary", "samples\InternalUsageLibrary\InternalUsageLibrary.csproj", "{DF937968-A710-4079-86D2-B2483FF3D81F}"
33-
EndProject
3430
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.LatestCSharpFeatures.Source", "src\dotnetCampus.LatestCSharpFeatures.Source\dotnetCampus.LatestCSharpFeatures.Source.csproj", "{16D75C29-3176-4CFD-A1B5-B5F24876B038}"
3531
EndProject
3632
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IsExternalInit", "IsExternalInit", "{4E06689B-E73A-4A04-AAA0-7959A6EC06E6}"
@@ -43,7 +39,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CAB44C21-D58
4339
EndProject
4440
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{878C1D77-0A77-44BD-847E-164188B10677}"
4541
EndProject
46-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dotnetCampus.LatestCSharpFeatures.Tests", "tests\dotnetCampus.LatestCSharpFeatures.Tests\dotnetCampus.LatestCSharpFeatures.Tests.csproj", "{D10BF09A-FDF3-43F0-BD54-49A73554CDAB}"
42+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.LatestCSharpFeatures.Tests", "tests\dotnetCampus.LatestCSharpFeatures.Tests\dotnetCampus.LatestCSharpFeatures.Tests.csproj", "{D10BF09A-FDF3-43F0-BD54-49A73554CDAB}"
4743
EndProject
4844
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.LatestCSharpFeatures.Analyzer", "src\dotnetCampus.LatestCSharpFeatures.Analyzer\dotnetCampus.LatestCSharpFeatures.Analyzer.csproj", "{642FA0CA-E827-4D96-9358-D596CD87DAF4}"
4945
EndProject
@@ -81,10 +77,6 @@ Global
8177
{72163C73-CBC5-4CB5-BDDF-769B7AFD6FAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
8278
{72163C73-CBC5-4CB5-BDDF-769B7AFD6FAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
8379
{72163C73-CBC5-4CB5-BDDF-769B7AFD6FAB}.Release|Any CPU.Build.0 = Release|Any CPU
84-
{DF937968-A710-4079-86D2-B2483FF3D81F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
85-
{DF937968-A710-4079-86D2-B2483FF3D81F}.Debug|Any CPU.Build.0 = Debug|Any CPU
86-
{DF937968-A710-4079-86D2-B2483FF3D81F}.Release|Any CPU.ActiveCfg = Release|Any CPU
87-
{DF937968-A710-4079-86D2-B2483FF3D81F}.Release|Any CPU.Build.0 = Release|Any CPU
8880
{16D75C29-3176-4CFD-A1B5-B5F24876B038}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
8981
{16D75C29-3176-4CFD-A1B5-B5F24876B038}.Debug|Any CPU.Build.0 = Debug|Any CPU
9082
{16D75C29-3176-4CFD-A1B5-B5F24876B038}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -108,7 +100,6 @@ Global
108100
{6ED76C7A-A16A-45A5-BC1F-91A880839C31} = {F0CBB519-BB38-4104-B840-4076BB206E36}
109101
{4EBF62CB-613E-4496-B890-B1F433ED7581} = {F0CBB519-BB38-4104-B840-4076BB206E36}
110102
{72163C73-CBC5-4CB5-BDDF-769B7AFD6FAB} = {CCAAE7A8-1879-4F67-98AA-D837C80227A2}
111-
{DF937968-A710-4079-86D2-B2483FF3D81F} = {19AD69CA-F593-4789-A51F-9E547033147D}
112103
{4E06689B-E73A-4A04-AAA0-7959A6EC06E6} = {CAB44C21-D58C-4732-B9D8-60B1DAE82BEF}
113104
{CCAAE7A8-1879-4F67-98AA-D837C80227A2} = {CAB44C21-D58C-4732-B9D8-60B1DAE82BEF}
114105
{F0CBB519-BB38-4104-B840-4076BB206E36} = {CAB44C21-D58C-4732-B9D8-60B1DAE82BEF}

samples/InternalUsageLibrary/InternalUsageLibrary.csproj

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/dotnetCampus.IsExternalInit.Source/dotnetCampus.IsExternalInit.Source.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>net5.0;netcoreapp3.0;netstandard1.0;net40</TargetFrameworks>
4+
<TargetFrameworks>net5.0;netcoreapp3.0;netstandard2.0;net40</TargetFrameworks>
55
<RootNamespace>System.Diagnostics.CodeAnalysis</RootNamespace>
66
<PackageId>dotnetCampus.IsExternalInit</PackageId>
77
<Description>If you use C# 9.0 or later and want to use record types, this '.Source' library adds internal IsExternalInit attribute support to your project. This confines the new language feature to the project itself without affecting other projects that reference it.</Description>

src/dotnetCampus.IsExternalInit/dotnetCampus.IsExternalInit.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>net5.0;netcoreapp3.0;netstandard1.0;net40</TargetFrameworks>
4+
<TargetFrameworks>net5.0;netcoreapp3.0;netstandard2.0;net40</TargetFrameworks>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
66
<RootNamespace>System.Diagnostics.CodeAnalysis</RootNamespace>
77
<Description>If you use C# 9.0 or later and want to use record types, this library adds public IsExternalInit attribute support for your project, allowing the new language feature to be propagated to other projects that reference this one.</Description>

src/dotnetCampus.LatestCSharpFeatures.Source/dotnetCampus.LatestCSharpFeatures.Source.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>net5.0;netcoreapp3.0;netstandard1.0;net40</TargetFrameworks>
4+
<TargetFrameworks>net5.0;netcoreapp3.0;netstandard2.0;net40</TargetFrameworks>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
66
<RootNamespace>System.Diagnostics.CodeAnalysis</RootNamespace>
77
<Description>This comprehensive package provides support for the latest C# language features in your project, enabling older .NET projects to use newer C# language constructs. Currently includes support for 'nullable', 'init', and 'required' keywords. The types introduced are internal, confining these features to the project itself without affecting other projects that reference it. By installing this package, you get all the newest C# features in one place, eliminating the need to install separate packages for each feature. Future updates will include more new features as they are released.</Description>

src/dotnetCampus.LatestCSharpFeatures/dotnetCampus.LatestCSharpFeatures.csproj

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

33
<PropertyGroup>
4-
<TargetFrameworks>net7.0;net5.0;netcoreapp3.0;netstandard1.0;net40</TargetFrameworks>
4+
<TargetFrameworks>net7.0;net5.0;netcoreapp3.0;netstandard2.0;net40</TargetFrameworks>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
66
<RootNamespace>System.Diagnostics.CodeAnalysis</RootNamespace>
77
<Description>This comprehensive package provides support for the latest C# language features in your project, enabling older .NET projects to use newer C# language constructs. Currently includes support for 'nullable', 'init', and 'required' keywords. The types introduced are public, allowing these features to propagate to other projects that reference this one. By installing this package, you get all the newest C# features in one place, eliminating the need to install separate packages for each feature. Future updates will include more new features as they are released.</Description>
@@ -12,9 +12,9 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<Compile Include="..\dotnetCampus.Nullable\**\*.cs" Exclude="..\dotnetCampus.Nullable\**\obj\**\*.cs;..\dotnetCampus.Nullable\**\bin\**\*.cs" />
16-
<Compile Include="..\dotnetCampus.IsExternalInit\**\*.cs" Exclude="..\dotnetCampus.IsExternalInit\**\obj\**\*.cs;..\dotnetCampus.IsExternalInit\**\bin\**\*.cs" />
17-
<Compile Include="..\dotnetCampus.Required\**\*.cs" Exclude="..\dotnetCampus.Required\**\obj\**\*.cs;..\dotnetCampus.Required\**\bin\**\*.cs" />
15+
<Compile Include="..\dotnetCampus.Nullable.Source\**\*.cs" Exclude="..\dotnetCampus.Nullable.Source\**\obj\**\*.cs;..\dotnetCampus.Nullable\**\bin\**\*.cs" />
16+
<Compile Include="..\dotnetCampus.IsExternalInit.Source\**\*.cs" Exclude="..\dotnetCampus.IsExternalInit.Source\**\obj\**\*.cs;..\dotnetCampus.IsExternalInit\**\bin\**\*.cs" />
17+
<Compile Include="..\dotnetCampus.Required.Source\**\*.cs" Exclude="..\dotnetCampus.Required.Source\**\obj\**\*.cs;..\dotnetCampus.Required\**\bin\**\*.cs" />
1818
</ItemGroup>
1919

2020
<Target Name="IncludeAllDependencies" BeforeTargets="_GetPackageFiles">

src/dotnetCampus.Nullable.Source/dotnetCampus.Nullable.Source.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>net5.0;netcoreapp3.0;netstandard1.0;net40</TargetFrameworks>
4+
<TargetFrameworks>net5.0;netcoreapp3.0;netstandard2.0;net40</TargetFrameworks>
55
<RootNamespace>System.Diagnostics.CodeAnalysis</RootNamespace>
66
<PackageId>dotnetCampus.Nullable</PackageId>
77
<Description>If you use C# 8.0 or later and enable the nullable types, this '.Source' library adds internal nullable reference attributes to your project. This confines the new language feature to the project itself without affecting other projects that reference it.</Description>

src/dotnetCampus.Nullable/dotnetCampus.Nullable.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>net5.0;netcoreapp3.0;netstandard1.0;net40</TargetFrameworks>
4+
<TargetFrameworks>net5.0;netcoreapp3.0;netstandard2.0;net40</TargetFrameworks>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
66
<RootNamespace>System.Diagnostics.CodeAnalysis</RootNamespace>
77
<Description>If you use C# 8.0 or later and enable the nullable types, this library adds public nullable reference attributes to your project, allowing the new language feature to be propagated to other projects that reference this one.</Description>

src/dotnetCampus.Required.Source/dotnetCampus.Required.Source.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>net7.0;netcoreapp3.0;netstandard1.0;net40</TargetFrameworks>
4+
<TargetFrameworks>net7.0;netcoreapp3.0;netstandard2.0;net40</TargetFrameworks>
55
<RootNamespace>System.Diagnostics.CodeAnalysis</RootNamespace>
66
<PackageId>dotnetCampus.Required</PackageId>
77
<Description>For C# 11.0 and newer. This package adds support for the 'required' keyword in your project, enforcing that fields or properties are initialized during object initialization. The types introduced are internal, meaning the 'required' functionality is limited to this project and won't propagate to referencing projects.</Description>

src/dotnetCampus.Required/dotnetCampus.Required.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>net7.0;net5.0;netcoreapp3.0;netstandard1.0;net40</TargetFrameworks>
4+
<TargetFrameworks>net7.0;net5.0;netcoreapp3.0;netstandard2.0;net40</TargetFrameworks>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
66
<RootNamespace>System.Diagnostics.CodeAnalysis</RootNamespace>
77
<Description>If you use C# 9.0 or later and want to use record types, this library adds public IsExternalInit attribute support for your project, allowing the new language feature to be propagated to other projects that reference this one.</Description>

0 commit comments

Comments
 (0)