Prerequirement (how to set unpackaged proejct)
Method 1
(menu)build - publish
Method 2
(Soultion Explorer)project : right click - publish
Method 3 (.NET CLI / Example)
dotnet publish -c Release -r win10-your_version --self-contained false /p:PublishSingleFile=true /p:PublishProfile=win10-your_version
Build Option
project_folder\Properties\PublishProfiles\win10-your_version.pubxml
<PublishDir>bin\\YOUR_FOLDER</PublishDir>
<SelfContained>false</SelfContained> <!--true includes framework, false does not.-->
<PublishSingleFile>true</PublishSingleFile> <!--Essential for single exe creation.-->
<PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
<PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">true</PublishReadyToRun>
<Configuration>Release</Configuration>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework> <!--Your windows version-->
Comment
Without framework, it's around 60MB.
with framework, it jumps to about 120MB.
'c# > winui3' 카테고리의 다른 글
winui 3 net8 unpackaged 프로젝트 환경 설정 하기 (4) | 2024.01.04 |
---|