https://github.com/sergio0694/win2dsample
A simple and minimal Win2D sample in an unpackaged Win32 app
https://github.com/sergio0694/win2dsample
Last synced: 6 months ago
JSON representation
A simple and minimal Win2D sample in an unpackaged Win32 app
- Host: GitHub
- URL: https://github.com/sergio0694/win2dsample
- Owner: Sergio0694
- Created: 2023-04-16T19:06:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-12T12:49:20.000Z (over 2 years ago)
- Last Synced: 2025-03-29T07:02:11.774Z (6 months ago)
- Language: C#
- Size: 2.18 MB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
This repo includes a simple and minimal Win2D sample in an unpackaged Win32 app.
### How to build ⚙️
From a Developer Power Shell for VS 2022:
```ps
msbuild src\Win2DRenderer.csproj -t:restore,publish /p:Configuration=Release /p:Platform=x64 /p:PublishSingleFile=True /p:SelfContained=True /p:PublishTrimmed=True /p:RuntimeIdentifier=win10-x64
```This will create a self-contained build.
To publish with NativeAOT, use:
```ps
$env:ENABLE_PUBLISH_AOT='true';
msbuild src\Win2DRenderer.csproj -t:restore,publish /p:Configuration=Release /p:Platform=x64 /p:RuntimeIdentifier=win10-x64
```Optionally, you can change the executable to skip the console, by also defining:
```ps
$env:HIDE_CONSOLE='true';
```