-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add minimal WinRT hello world project (#26)
- Loading branch information
1 parent
c634c83
commit 4c11e7f
Showing
4 changed files
with
57 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System; | ||
|
||
namespace winrt_component_minimal; | ||
|
||
public sealed partial class Class | ||
{ | ||
public void SayHello() | ||
{ | ||
Console.WriteLine("Hello, World! From WinRT!"); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
src/winrt-component-minimal/winrt-component-minimal.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net9.0-windows10.0.22621.0</TargetFramework> | ||
<Platforms>x64;arm64</Platforms> | ||
<Nullable>enable</Nullable> | ||
<AssemblyName>winrt_component_minimal</AssemblyName> | ||
|
||
<!-- Enable building with 'dotnet msbuild' --> | ||
<EnableMsixTooling>true</EnableMsixTooling> | ||
|
||
<!-- CsWinRT settings --> | ||
<WindowsSdkPackageVersion>10.0.22621.35-preview</WindowsSdkPackageVersion> | ||
<CsWinRTComponent>true</CsWinRTComponent> | ||
|
||
<!-- CsWinRT size saving settings --> | ||
<CsWinRTEnableDynamicObjectsSupport>false</CsWinRTEnableDynamicObjectsSupport> | ||
<CsWinRTUseExceptionResourceKeys>true</CsWinRTUseExceptionResourceKeys> | ||
<CsWinRTEnableDefaultCustomTypeMappings>false</CsWinRTEnableDefaultCustomTypeMappings> | ||
<CsWinRTEnableICustomPropertyProviderSupport>false</CsWinRTEnableICustomPropertyProviderSupport> | ||
<CsWinRTEnableIReferenceSupport>false</CsWinRTEnableIReferenceSupport> | ||
<CsWinRTEnableIDynamicInterfaceCastableSupport>false</CsWinRTEnableIDynamicInterfaceCastableSupport> | ||
|
||
<!-- Size saving settings --> | ||
<PublishAot>true</PublishAot> | ||
<NativeLib>Shared</NativeLib> | ||
<InvariantGlobalization>true</InvariantGlobalization> | ||
<OptimizationPreference>Size</OptimizationPreference> | ||
<StackTraceSupport>false</StackTraceSupport> | ||
<UseSystemResourceKeys>true</UseSystemResourceKeys> | ||
|
||
<!-- Workaround for a .NET 9 SDK issue --> | ||
<SelfContained>true</SelfContained> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.0-prerelease.240602.1" /> | ||
</ItemGroup> | ||
|
||
</Project> |