diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml index 014c5b5..29f09e0 100644 --- a/.github/workflows/dotnet-build.yml +++ b/.github/workflows/dotnet-build.yml @@ -1,6 +1,6 @@ name: .NET Build -on: [push, pull_request] +on: push jobs: diff --git a/.github/workflows/nuget-tag-publish.yml b/.github/workflows/nuget-tag-publish.yml index b8ef5cc..453db7b 100644 --- a/.github/workflows/nuget-tag-publish.yml +++ b/.github/workflows/nuget-tag-publish.yml @@ -13,6 +13,12 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install dotnet tool + run: dotnet tool install -g dotnetCampus.TagToVersion + + - name: Set tag to version + run: dotnet TagToVersion -t ${{ github.ref }} + - name: Setup .NET uses: actions/setup-dotnet@v4 with: @@ -22,12 +28,7 @@ jobs: 6.0.x 8.0.x 9.0.x - - - name: Install dotnet tool - run: dotnet tool install -g dotnetCampus.TagToVersion - - name: Set tag to version - run: dotnet TagToVersion -t ${{ github.ref }} - name: Build with dotnet run: | diff --git a/src/dotnetCampus.AppHost/Patches/README.md b/src/dotnetCampus.AppHost/Patches/README.md index 2d3b154..ae0c396 100644 --- a/src/dotnetCampus.AppHost/Patches/README.md +++ b/src/dotnetCampus.AppHost/Patches/README.md @@ -1,4 +1,4 @@ -# .NET Runtime 仓库补丁说明 +# .NET Runtime 仓库补丁说明 ## AppHost.exe 编译方法 diff --git a/src/dotnetCampus.AppHost/Program.cs b/src/dotnetCampus.AppHost/Program.cs index 8ef3ee4..88707ea 100644 --- a/src/dotnetCampus.AppHost/Program.cs +++ b/src/dotnetCampus.AppHost/Program.cs @@ -1,20 +1,28 @@ -#if !NET8_0 +#if !IS_EXE_TOOL +using System; + internal static class Program { private static void Main() { + throw new NotSupportedException("不支持 .NET 8.0 以下的版本。通常是 NuGet 包制作错误,如看到此异常,请到 https://github.com/dotnet-campus/dotnetCampus.AppHost 提 Issues"); } } #else +using System; using dotnetCampus.AppHosting.Tasks; using dotnetCampus.Cli; using dotnetCampus.MSBuildUtils; try { + Console.WriteLine(new MSBuildMessage($"开始执行 dotnet campus AppHost 替换工作。命令行参数:{Environment.CommandLine}").ToString(MessageLevel.Message)); + var options = CommandLine.Parse(args) .AddHandler(o => o.Run()) .Run(); + + Console.WriteLine(new MSBuildMessage("完成 dotnet campus AppHost 替换工作").ToString(MessageLevel.Message)); } catch (MSBuildException ex) { diff --git a/src/dotnetCampus.AppHost/dotnetCampus.AppHost.csproj b/src/dotnetCampus.AppHost/dotnetCampus.AppHost.csproj index 0f8e47e..1da64ea 100644 --- a/src/dotnetCampus.AppHost/dotnetCampus.AppHost.csproj +++ b/src/dotnetCampus.AppHost/dotnetCampus.AppHost.csproj @@ -3,6 +3,8 @@ WinExe net8.0;net6.0;netstandard2.0;net45 + net8.0 + $(DefineConstants);IS_EXE_TOOL true true dotnetCampus.AppHosting @@ -30,7 +32,7 @@ snupkg - + @@ -40,7 +42,7 @@ - + @@ -55,7 +57,7 @@ - +