Skip to content

Commit

Permalink
Merge pull request #155 from dotnet-campus/t/walterlv/upgrade
Browse files Browse the repository at this point in the history
Upgrade project files and use new features.
  • Loading branch information
lindexi authored Jul 17, 2024
2 parents 37a8265 + 407d821 commit 3a8d2f5
Show file tree
Hide file tree
Showing 64 changed files with 2,216 additions and 2,426 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ jobs:
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x
8.0.x
- name: Build
run: dotnet build --configuration Release
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/dotnet-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
on:
push:
branches:
- master
- main
jobs:
dotnet-format:
runs-on: windows-latest
Expand All @@ -20,9 +20,8 @@ jobs:
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x
8.0.x
- name: Install dotnetCampus.EncodingNormalior
run: dotnet tool update -g dotnetCampus.EncodingNormalior
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/nuget-tag-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ jobs:
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x
8.0.x
- name: Install dotnet tool
run: dotnet tool install -g dotnetCampus.TagToVersion
Expand All @@ -36,13 +35,13 @@ jobs:
- name: Install Nuget
uses: nuget/setup-nuget@v1
with:
nuget-version: '5.x'
nuget-version: '6.x'

- name: Add private GitHub registry to NuGet
run: |
nuget sources add -name github -Source https://nuget.pkg.github.com/dotnet-campus/index.json -Username dotnet-campus -Password ${{ secrets.GITHUB_TOKEN }}
- name: Push generated package to GitHub registry
run: |
nuget push .\bin\Release\*.nupkg -Source github -SkipDuplicate
nuget push .\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }}
nuget push .\artifacts\package\release\*.nupkg -Source github -SkipDuplicate
nuget push .\artifacts\package\release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }}
43 changes: 32 additions & 11 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,22 +1,43 @@
<Project>

<Import Project="build\Version.props" />

<!-- Framework and language -->
<PropertyGroup>
<!-- Language -->
<LangVersion>latest</LangVersion>
<PackageOutputPath>$(MSBuildThisFileDirectory)bin\$(Configuration)</PackageOutputPath>
<Company>dotnet campus(.NET 职业技术学院)</Company>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Build -->
<ArtifactsPath>$(MSBuildThisFileDirectory)artifacts</ArtifactsPath>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<Deterministic>true</Deterministic>
<!--
Add NoWarn to remove build warnings
NU1803: Using an insecure http NuGet source
-->
<NoWarn>$(NoWarn);NU1507;NU1803;NETSDK1201;PRI257</NoWarn>
<!--
CA1416: Platform compatibility warning
-->
<WarningsAsErrors>$(WarningAsErrors);CA1416</WarningsAsErrors>
</PropertyGroup>

<!-- Custom properties -->
<PropertyGroup>
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
<ThisYear>$([System.DateTime]::Now.ToString(`yyyy`))</ThisYear>
</PropertyGroup>

<!-- Package and project properties -->
<PropertyGroup>
<Description>本机内多进程通讯库,稳定 IPC 通讯库</Description>
<Company>dotnet campus(.NET 职业技术学院)</Company>
<Authors>dotnet-campus</Authors>
<Copyright>Copyright © 2020-$(ThisYear) dotnet campus, All Rights Reserved.</Copyright>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/dotnet-campus/dotnetCampus.Ipc</RepositoryUrl>
<PackageProjectUrl>https://github.com/dotnet-campus/dotnetCampus.Ipc</PackageProjectUrl>
<Description>本机内多进程通讯库,稳定 IPC 通讯库</Description>

<RepositoryType>git</RepositoryType>
<Copyright>Copyright © 2020-2024 dotnet campus, All Rights Reserved.</Copyright>

<NoWarn>$(NoWarn);NU1803</NoWarn>
</PropertyGroup>

<ItemGroup>
<SourceRoot Include="$(MSBuildThisFileDirectory)/"/>
</ItemGroup>
</Project>
29 changes: 29 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Project>
<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="dotnetCampus.AsyncWorkerCollection.Source" Version="1.7.2" />
<PackageVersion Include="dotnetCampus.CommandLine" Version="3.3.1" />
<PackageVersion Include="dotnetCampus.LatestCSharpFeatures" Version="12.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Hosting" Version="2.2.7" />
<PackageVersion Include="Microsoft.CodeAnalysis" Version="4.10.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.MSTest" Version="1.1.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.MSTest" Version="1.1.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeRefactoring.Testing.MSTest" Version="1.1.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.10.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.Analyzer.Testing.MSTest" Version="1.1.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.CodeFix.Testing.MSTest" Version="1.1.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.CodeRefactoring.Testing.MSTest" Version="1.1.2" />
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.0.0" />
<PackageVersion Include="Moq" Version="4.20.70" />
<PackageVersion Include="MSTest.TestAdapter" Version="3.4.3" />
<PackageVersion Include="MSTest.TestFramework" Version="3.4.3" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="System.IO.Pipelines" Version="8.0.0" />
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
<PackageVersion Include="Walterlv.NullableAttributes.Source" Version="7.4.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.4.0" />
<PackageReference Include="Walterlv.NullableAttributes.Source" Version="7.4.0">
<PackageReference Include="dotnetCampus.LatestCSharpFeatures" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions demo/dotnetCampus.Ipc.WpfDemo/dotnetCampus.Ipc.WpfDemo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="dotnetCampus.CommandLine" Version="3.3.0" />
<PackageReference Include="dotnetCampus.CommandLine" />
<ProjectReference Include="..\..\src\dotnetCampus.Ipc\dotnetCampus.Ipc.csproj" />
</ItemGroup>

</Project>
</Project>
8 changes: 7 additions & 1 deletion dotnetCampus.Ipc.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.31911.260
Expand Down Expand Up @@ -28,8 +27,15 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "dotnetCampus.Ipc.PipeMvcSha
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{11767A0B-CBFB-4323-BCEE-DE1CDD6C4B4B}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitattributes = .gitattributes
.gitignore = .gitignore
CHANGELOG.md = CHANGELOG.md
Directory.Build.props = Directory.Build.props
build\Version.props = build\Version.props
Directory.Packages.props = Directory.Packages.props
LICENSE = LICENSE
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.Ipc.Analyzers", "src\dotnetCampus.Ipc.Analyzers\dotnetCampus.Ipc.Analyzers.csproj", "{5035AC84-F775-422F-BB5F-E3713404DCB2}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.2.7" />
<PackageReference Include="System.IO.Pipelines" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Hosting" />
<PackageReference Include="System.IO.Pipelines" />
<!-- <PackageReference Include="Microsoft.Extensions.HostFactoryResolver.Sources" /> -->
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using dotnetCampus.Ipc.DiagnosticAnalyzers.Compiling;
using dotnetCampus.Ipc.Analyzers.Compiling;

namespace dotnetCampus.Ipc.DiagnosticAnalyzers;
namespace dotnetCampus.Ipc.Analyzers;

[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class AddIpcProxyConfigsAnalyzer : DiagnosticAnalyzer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using dotnetCampus.Ipc.DiagnosticAnalyzers.Compiling;
using dotnetCampus.Ipc.Analyzers.Compiling;

namespace dotnetCampus.Ipc.DiagnosticAnalyzers;
namespace dotnetCampus.Ipc.Analyzers;

[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class AddIpcShapeAnalyzer : DiagnosticAnalyzer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using dotnetCampus.Ipc.CodeAnalysis.Models;
using dotnetCampus.Ipc.SourceGenerators.Compiling;
using dotnetCampus.Ipc.Generators.Compiling;

namespace dotnetCampus.Ipc.DiagnosticAnalyzers.Compiling;
namespace dotnetCampus.Ipc.Analyzers.Compiling;

internal static class IpcAttributeHelper
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace dotnetCampus.Ipc.DiagnosticAnalyzers.Compiling;
namespace dotnetCampus.Ipc.Analyzers.Compiling;

/// <summary>
/// 用语法节点和语义模型描述一次方法调用。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using dotnetCampus.Ipc.DiagnosticAnalyzers.Compiling;
using dotnetCampus.Ipc.Analyzers.Compiling;

namespace dotnetCampus.Ipc.DiagnosticAnalyzers;
namespace dotnetCampus.Ipc.Analyzers;

[DiagnosticAnalyzer(LanguageNames.CSharp)]
internal class ContractTypeDismatchWithInterfaceAnalyzer : DiagnosticAnalyzer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using dotnetCampus.Ipc.DiagnosticAnalyzers.Compiling;
using dotnetCampus.Ipc.Analyzers.Compiling;

namespace dotnetCampus.Ipc.DiagnosticAnalyzers;
namespace dotnetCampus.Ipc.Analyzers;

[DiagnosticAnalyzer(LanguageNames.CSharp)]
internal class ContractTypeMustBeAnInterfaceAnalyzer : DiagnosticAnalyzer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using dotnetCampus.Ipc.DiagnosticAnalyzers.Compiling;
using dotnetCampus.Ipc.Analyzers.Compiling;

namespace dotnetCampus.Ipc.DiagnosticAnalyzers;
namespace dotnetCampus.Ipc.Analyzers;

[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class DefaultReturnDependsOnIgnoresIpcExceptionAnalyzer : DiagnosticAnalyzer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using dotnetCampus.Ipc.DiagnosticAnalyzers.Compiling;
using dotnetCampus.Ipc.Analyzers.Compiling;

namespace dotnetCampus.Ipc.DiagnosticAnalyzers;
namespace dotnetCampus.Ipc.Analyzers;

[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class EmptyIpcMemberAttributeIsUnnecessaryAnalyzer : DiagnosticAnalyzer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using dotnetCampus.Ipc.DiagnosticAnalyzers.Compiling;
using dotnetCampus.Ipc.Analyzers.Compiling;

namespace dotnetCampus.Ipc.DiagnosticAnalyzers;
namespace dotnetCampus.Ipc.Analyzers;

[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class IgnoresIpcExceptionIsRecommendedAnalyzer : DiagnosticAnalyzer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using dotnetCampus.Ipc.DiagnosticAnalyzers.Compiling;

using dotnetCampus.Ipc.Analyzers.Compiling;
using Microsoft.CodeAnalysis.CSharp.Syntax;

namespace dotnetCampus.Ipc.CodeAnalysis.Utils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
using dotnetCampus.Ipc.DiagnosticAnalyzers.Compiling;
using dotnetCampus.Ipc.Analyzers.Compiling;
using dotnetCampus.Ipc.Generators.Compiling;
using dotnetCampus.Ipc.Properties;
using dotnetCampus.Ipc.SourceGenerators.Compiling;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.Text;
using static dotnetCampus.Ipc.SourceGenerators.Utils.GeneratorHelper;
using static dotnetCampus.Ipc.Generators.Utils.GeneratorHelper;
using SF = Microsoft.CodeAnalysis.CSharp.SyntaxFactory;

namespace dotnetCampus.Ipc.CodeFixeProviders;
namespace dotnetCampus.Ipc.CodeFixes;

[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(IgnoresIpcExceptionIsRecommendedCodeFixProvider)), Shared]
public class AddIpcShapeCodeFixProvider : CodeFixProvider
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
using System.Collections.Immutable;
using System.Composition;
using System.Threading;
using System.Threading.Tasks;

using dotnetCampus.Ipc.DiagnosticAnalyzers.Compiling;
using dotnetCampus.Ipc.Analyzers.Compiling;
using dotnetCampus.Ipc.Properties;

using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;

using SF = Microsoft.CodeAnalysis.CSharp.SyntaxFactory;

namespace dotnetCampus.Ipc.CodeFixeProviders;
namespace dotnetCampus.Ipc.CodeFixes;

[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(IgnoresIpcExceptionIsRecommendedCodeFixProvider)), Shared]
public class ChangeClassContractTypeCodeFixProvider : CodeFixProvider
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
using System.Collections.Immutable;
using System.Composition;
using System.Threading;
using System.Threading.Tasks;

using dotnetCampus.Ipc.Properties;

using dotnetCampus.Ipc.Properties;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;

using SF = Microsoft.CodeAnalysis.CSharp.SyntaxFactory;

namespace dotnetCampus.Ipc.CodeFixeProviders;
namespace dotnetCampus.Ipc.CodeFixes;

[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(IgnoresIpcExceptionIsRecommendedCodeFixProvider)), Shared]
public class DefaultReturnDependsOnIgnoresIpcExceptionCodeFixProvider : CodeFixProvider
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
using System.Collections.Immutable;
using System.Composition;
using System.Threading;
using System.Threading.Tasks;

using dotnetCampus.Ipc.Properties;

using dotnetCampus.Ipc.Properties;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;

using SF = Microsoft.CodeAnalysis.CSharp.SyntaxFactory;

namespace dotnetCampus.Ipc.CodeFixeProviders;
namespace dotnetCampus.Ipc.CodeFixes;

[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(IgnoresIpcExceptionIsRecommendedCodeFixProvider)), Shared]
public class EmptyIpcMemberAttributeIsUnnecessaryCodeFixProvider : CodeFixProvider
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using dotnetCampus.Ipc.Properties;

using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.CodeFixes;

using SF = Microsoft.CodeAnalysis.CSharp.SyntaxFactory;

namespace dotnetCampus.Ipc.CodeFixeProviders;
namespace dotnetCampus.Ipc.CodeFixes;

[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(IgnoresIpcExceptionIsRecommendedCodeFixProvider)), Shared]
public class IgnoresIpcExceptionIsRecommendedCodeFixProvider : CodeFixProvider
Expand Down
Loading

0 comments on commit 3a8d2f5

Please sign in to comment.