CsWinRTAotExportsEnabled
incorrectly assumes PublishAot == true
implies a publish is actually occurring
#1546
Labels
bug
Something isn't working
Microsoft.Windows.CsWinRT.targets defines a property
CsWinRTAotExportsEnabled
:However,
PublishAot
being true does not indicate that a build was actually an NAOT build, instead it indicates that a publish build will produce NAOT’d assemblies. This results in build failures when expected artefacts don’t exist. For example, WinRT.Host.dll is outputted conditional onCsWinRTAotExportsEnabled
not being true.I'm not sure how often this idiom is used across the targets files, so I can't recommend a specific fix, but it's probably something like setting
CsWinRTAotExportsEnabled
to true in a target that runs only before the publish target and ensuring that the only placePublishAot
is checked is when that's set.The text was updated successfully, but these errors were encountered: