- PublishAot=true, InvariantGlobalization=true, AssemblyName=noz - Version 0.1.0 baked into binary via AssemblyInformationalVersion - MSBuild target injects git short hash as SourceRevisionId at build time - macOS: LinkerArg for Homebrew OpenSSL path (required for AOT linking) - noz --version / -v exits cleanly without starting the REPL
40 lines
1.4 KiB
XML
40 lines
1.4 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\NozCli.Core\NozCli.Core.csproj" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Spectre.Console" Version="0.55.2" />
|
|
</ItemGroup>
|
|
|
|
<PropertyGroup>
|
|
<OutputType>Exe</OutputType>
|
|
<TargetFramework>net10.0</TargetFramework>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<Nullable>enable</Nullable>
|
|
<AssemblyName>noz</AssemblyName>
|
|
<RootNamespace>NozCli</RootNamespace>
|
|
<PublishAot>true</PublishAot>
|
|
<InvariantGlobalization>true</InvariantGlobalization>
|
|
<Version>0.1.0</Version>
|
|
<AssemblyVersion>0.1.0</AssemblyVersion>
|
|
</PropertyGroup>
|
|
|
|
<!-- Bake git short hash into InformationalVersion (e.g. 0.1.0+abc1234) -->
|
|
<Target Name="SetGitHash" BeforeTargets="GetAssemblyVersion">
|
|
<Exec Command="git rev-parse --short HEAD" ConsoleToMSBuild="true" IgnoreExitCode="true">
|
|
<Output TaskParameter="ConsoleOutput" PropertyName="GitShortHash" />
|
|
</Exec>
|
|
<PropertyGroup>
|
|
<SourceRevisionId Condition="'$(GitShortHash)' != ''">$(GitShortHash)</SourceRevisionId>
|
|
</PropertyGroup>
|
|
</Target>
|
|
|
|
<!-- macOS: tell the linker where Homebrew's OpenSSL lives -->
|
|
<ItemGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))">
|
|
<LinkerArg Include="-L/opt/homebrew/opt/openssl/lib" />
|
|
<LinkerArg Include="-L/opt/homebrew/lib" />
|
|
</ItemGroup>
|
|
|
|
</Project>
|