chore: set UseAppHost to false when publishing

* CI: make `any` fully platform unspecific [38ab47c]

As https://docs.microsoft.com/en-us/dotnet/core/deploying/deploy-with-cli points out, dotnet >3.1 will produce a platform-specific executable by default unless set UseAppHost=false

* chore: set UseAppHost to false when publishing [0fbfb10]

Co-authored-by: genteure <genteure@gmail.com>
This commit is contained in:
雷宇辰 2022-08-31 11:33:40 +08:00 committed by GitHub
parent cdd563a753
commit 050226fdcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -4,9 +4,11 @@
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<StartupObject>BililiveRecorder.Cli.Program</StartupObject>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
<RuntimeIdentifiers>win-x64;osx-x64;osx.10.11-x64;linux-arm64;linux-arm;linux-x64</RuntimeIdentifiers>
<RuntimeIdentifier Condition=" '$(RuntimeIdentifier)' == 'any' "></RuntimeIdentifier>
<UseAppHost Condition=" '$(RuntimeIdentifier)' == '' and '$(Configuration)' != 'Debug' ">false</UseAppHost>
<PublishDir Condition=" '$(RuntimeIdentifier)' == '' ">publish\any\$(Configuration)</PublishDir>
<PublishDir Condition=" '$(RuntimeIdentifier)' != '' ">publish\$(RuntimeIdentifier)\$(Configuration)</PublishDir>
<SelfContained Condition=" '$(RuntimeIdentifier)' == '' ">false</SelfContained>

View File

@ -1,14 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<NoWarn>1701;1702;1591</NoWarn>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
<SelfContained Condition=" '$(RuntimeIdentifier)' == '' ">false</SelfContained>
<SelfContained Condition=" '$(SelfContained)' == '' ">true</SelfContained>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AngleSharp" Version="0.17.1" />
<PackageReference Include="AutoMapper" Version="11.0.1" />