Consider adding default publishing configurations for each platform?
Closed this issue · 1 comments
Zaid-Ajaj commented
so that dotnet publish -c Release
doesn't require extra configuration on different platform.
Something like this:
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(RuntimeIdentifier)' == 'win-x86' ">
<OutputType>WinExe</OutputType>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
<PropertyGroup Condition=" '$(RuntimeIdentifier)' == 'win-x64' ">
<OutputType>WinExe</OutputType>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
<PropertyGroup Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' ">
<OutputType>Exe</OutputType>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
<PropertyGroup Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' ">
<OutputType>Exe</OutputType>
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
philippjbauer commented
The guide for publishing on all platforms is available as a sample in the Photino.Samples repository as a separate project. It includes a publish script and packaging templates that can be adapted for your specific situation.
Currently only available in the debug branch (as of 03/19/2024), lets find the rough edges together! :)
https://github.com/tryphotino/photino.Samples/tree/debug/Photino.PublishPhotino