From 4c11e7fb4c40d294086ca541546278605eda01c7 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Fri, 28 Jun 2024 00:04:44 -0700 Subject: [PATCH] Add minimal WinRT hello world project (#26) --- .github/workflows/sizestats.yml | 5 ++- .../winrt-component-full.csproj | 7 ++-- src/winrt-component-minimal/Class.cs | 11 +++++ .../winrt-component-minimal.csproj | 40 +++++++++++++++++++ 4 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 src/winrt-component-minimal/Class.cs create mode 100644 src/winrt-component-minimal/winrt-component-minimal.csproj diff --git a/.github/workflows/sizestats.yml b/.github/workflows/sizestats.yml index 17bbaac..ec07386 100644 --- a/.github/workflows/sizestats.yml +++ b/.github/workflows/sizestats.yml @@ -177,7 +177,8 @@ jobs: matrix: flavor: [baseline, compare] project: [ - { name: winrt-component-full, binary: winrt_component_full.dll } + { name: winrt-component-full, binary: winrt_component_full.dll }, + { name: winrt-component-minimal, binary: winrt_component_minimal.dll } ] runs-on: windows-latest steps: @@ -200,7 +201,7 @@ jobs: id: artifact-upload-step with: retention-days: 90 - name: logs-${{ matrix.project }}-${{ matrix.flavor }}-windows + name: logs-${{ matrix.project.name }}-${{ matrix.flavor }}-windows path: | src/${{ matrix.project.name }}/obj/x64/Release/net9.0-windows10.0.22621.0/win-x64/native/${{ matrix.project.name }}.mstat src/${{ matrix.project.name }}/obj/x64/Release/net9.0-windows10.0.22621.0/win-x64/native/${{ matrix.project.name }}.map.xml diff --git a/src/winrt-component-full/winrt-component-full.csproj b/src/winrt-component-full/winrt-component-full.csproj index 08e9d9c..129dbfa 100644 --- a/src/winrt-component-full/winrt-component-full.csproj +++ b/src/winrt-component-full/winrt-component-full.csproj @@ -16,13 +16,12 @@ true Shared - true - Size - false - true true + + + $(NoWarn);CS0618;CS0067 diff --git a/src/winrt-component-minimal/Class.cs b/src/winrt-component-minimal/Class.cs new file mode 100644 index 0000000..4b29087 --- /dev/null +++ b/src/winrt-component-minimal/Class.cs @@ -0,0 +1,11 @@ +using System; + +namespace winrt_component_minimal; + +public sealed partial class Class +{ + public void SayHello() + { + Console.WriteLine("Hello, World! From WinRT!"); + } +} diff --git a/src/winrt-component-minimal/winrt-component-minimal.csproj b/src/winrt-component-minimal/winrt-component-minimal.csproj new file mode 100644 index 0000000..fdb7af5 --- /dev/null +++ b/src/winrt-component-minimal/winrt-component-minimal.csproj @@ -0,0 +1,40 @@ + + + + net9.0-windows10.0.22621.0 + x64;arm64 + enable + winrt_component_minimal + + + true + + + 10.0.22621.35-preview + true + + + false + true + false + false + false + false + + + true + Shared + true + Size + false + true + + + true + + + + + + +