Nukepayload2.UI.VBWinUI3.XamlCompiler
3.0.0-dev
See the version list below for details.
dotnet add package Nukepayload2.UI.VBWinUI3.XamlCompiler --version 3.0.0-dev
NuGet\Install-Package Nukepayload2.UI.VBWinUI3.XamlCompiler -Version 3.0.0-dev
<PackageReference Include="Nukepayload2.UI.VBWinUI3.XamlCompiler" Version="3.0.0-dev"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Nukepayload2.UI.VBWinUI3.XamlCompiler" Version="3.0.0-dev" />
<PackageReference Include="Nukepayload2.UI.VBWinUI3.XamlCompiler"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Nukepayload2.UI.VBWinUI3.XamlCompiler --version 3.0.0-dev
#r "nuget: Nukepayload2.UI.VBWinUI3.XamlCompiler, 3.0.0-dev"
#:package Nukepayload2.UI.VBWinUI3.XamlCompiler@3.0.0-dev
#addin nuget:?package=Nukepayload2.UI.VBWinUI3.XamlCompiler&version=3.0.0-dev&prerelease
#tool nuget:?package=Nukepayload2.UI.VBWinUI3.XamlCompiler&version=3.0.0-dev&prerelease
Nukepayload2.UI.VBWinUI3.XamlCompiler
A compiler-only replacement for the XAML compiler binaries that ship inside
Microsoft.WindowsAppSDK.WinUI. Built from
winui3-vbxamlc, a fork of microsoft-ui-xaml
whose Visual Basic code generators are fixed: with DISABLE_XAML_GENERATED_MAIN defined they emit
XamlGeneratedProgram.XamlGeneratedMain() plus the two-layer XamlGeneratedCreateApplicationInstance
hooks that the stock compiler does not produce for VB.
The package contains only the compiler binaries. The MSBuild targets, genxbf and the reference
assemblies keep coming from Microsoft.WindowsAppSDK; three properties are redirected:
| Property | Redirected to |
|---|---|
XamlCompilerTaskPath |
tools\net472\Microsoft.UI.Xaml.Markup.Compiler.dll (desktop MSBuild) / tools\net8.0\… (Core MSBuild) |
XamlCompilerJsonTaskPath |
tools\net472\Microsoft.UI.Xaml.Markup.Compiler.IO.dll (desktop) / tools\net8.0\… (Core) |
XamlCompilerExePath |
tools\net472\XamlCompiler.exe |
NuGet imports the props through obj\<project>.nuget.g.props, which is evaluated before the
empty-value guards in the stock Microsoft.UI.Xaml.Markup.Compiler.interop.targets, so these
assignments win.
Usage
<ItemGroup>
<PackageReference Include="Nukepayload2.UI.VBWinUI3.XamlCompiler" Version="3.0.0-dev" />
</ItemGroup>
DevelopmentDependency=true keeps the package private, so no PrivateAssets / ExcludeAssets are
needed - adding them would also suppress the buildTransitive import that does the override.
To use the stock compiler instead:
dotnet build -p:VBWinUI3XamlCompilerEnabled=false
Verifying which compiler ran
- The build log contains
VBWinUI3 XamlCompiler override active: …with all three paths under~\.nuget\packages\nukepayload2.ui.vbwinui3.xamlcompiler\<version>\tools\. - The generated
App.g.i.vbcontainsFriend Module XamlGeneratedProgramandSub XamlGeneratedMain(). - Every generated file carries
GeneratedCodeAttribute("Microsoft.UI.Xaml.Markup.Compiler", " 3.0.0.0"); the stock 2.2.x compiler stamps3.0.0.2606.
Incremental builds decide whether to re-run XAML compilation from a fingerprint of the XAML files,
references and local assemblies, not of the compiler binaries: delete obj\ and bin\ after
switching or repacking the compiler.
Repacking
:: 1. build the compiler in Release (writes BuildOutput\packaging\Release\tools)
Build.cmd product
:: 2. pack into ..\..\PackageStore
build\xamlcompiler-nupkg\pack.cmd
~\.nuget\packages\<id>\<version> is immutable to NuGet, so a repacked version is ignored in favour
of the cached copy. Bump the version (pack.cmd -p:PackageVersion=3.0.0-dev.1) or delete the cached
folder and restore again.
Differences from the stock tools
- The Core-MSBuild tool folder is
tools\net8.0\instead oftools\net6.0\; the file names are the same. - Only the three binaries above are replaced. The fork's
interop.targetsalso passesEnabledXamlOptionalChanges/DisabledXamlOptionalChanges; that file is not shipped, so those properties stay empty (their default), which only affects the C#/C++ generators.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Nukepayload2.UI.VBWinUI3.XamlCompiler:
| Package | Downloads |
|---|---|
|
Nukepayload2.UI.VBWinUI3
WinUI 3 build support for Visual Basic projects with automatic MSBuild target integration |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0-dev.260913.10 | 60 | 9/13/2026 |
| 3.0.0-dev.260913.1 | 60 | 9/13/2026 |
| 3.0.0-dev | 46 | 9/13/2026 |