From 3096ff29ac513019966dd14411a9209ee759e12c Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Sat, 22 Feb 2025 19:06:25 -0300 Subject: [PATCH] Add RuntimeIdentifer(s) properties to project constants These are typically useful in addition to TFM. --- src/ThisAssembly.Project/ThisAssembly.Project.props | 3 +++ src/ThisAssembly.Tests/Tests.cs | 5 +++++ src/ThisAssembly.Tests/ThisAssembly.Tests.csproj | 1 + 3 files changed, 9 insertions(+) diff --git a/src/ThisAssembly.Project/ThisAssembly.Project.props b/src/ThisAssembly.Project/ThisAssembly.Project.props index 73aef977..37b4abc1 100644 --- a/src/ThisAssembly.Project/ThisAssembly.Project.props +++ b/src/ThisAssembly.Project/ThisAssembly.Project.props @@ -7,6 +7,9 @@ + + + diff --git a/src/ThisAssembly.Tests/Tests.cs b/src/ThisAssembly.Tests/Tests.cs index a6cf1804..4ef0ac36 100644 --- a/src/ThisAssembly.Tests/Tests.cs +++ b/src/ThisAssembly.Tests/Tests.cs @@ -124,6 +124,11 @@ public void CanUseHierarchicalMetadata() public void CanUseProjectProperty() => Assert.Equal("Bar", ThisAssembly.Project.Foo); + /// + [Fact] + public void CanUseProjectProperty2() + => Assert.NotEmpty(ThisAssembly.Project.RuntimeIdentifiers); + /// [Fact] public void CanUseStringsNamedArguments() diff --git a/src/ThisAssembly.Tests/ThisAssembly.Tests.csproj b/src/ThisAssembly.Tests/ThisAssembly.Tests.csproj index 2082d2ef..e0c53a08 100644 --- a/src/ThisAssembly.Tests/ThisAssembly.Tests.csproj +++ b/src/ThisAssembly.Tests/ThisAssembly.Tests.csproj @@ -26,6 +26,7 @@ $(ProjectFile) true true + win-x64;linux-x86