Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions use-current-runtime/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
14 changes: 14 additions & 0 deletions use-current-runtime/console.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<Target Name="EchoRuntimeIdentifier" AfterTargets="Restore" BeforeTargets="BeforeBuild">
<Exec Command="echo 'RuntimeIdentifier is $(RuntimeIdentifier)'" />
</Target>

</Project>
11 changes: 11 additions & 0 deletions use-current-runtime/test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "use-current-runtime",
"enabled": true,
"requiresSdk": true,
"version": "6.0",
"versionSpecific": false,
"type": "bash",
"cleanup": true,
"ignoredRIDs":[
]
}
16 changes: 16 additions & 0 deletions use-current-runtime/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/bash

set -euo pipefail

set -x

PORTABLE_RID="$(../runtime-id --portable)"

DOTNET_BUILD_OUTPUT=$(dotnet build --use-current-runtime)

if echo "$DOTNET_BUILD_OUTPUT" | grep -q "RuntimeIdentifier is $PORTABLE_RID"; then
echo "PASS: --use-current-runtime uses portable rid."
else
echo "FAIL: --use-current-runtime does not use portable rid."
exit 1
fi