Msbuld command fails randomly in VS2019 - Runtime-generated FailFast: (7): Unhandled exception

Occasional Visitor

Msbuild build is failing randomly with following errors in VS2019:


Cleaning up unreferenced code


Running 'WriteAssemblies' transform, heap at 599 MB.


Runtime-generated FailFast: (7): Unhandled exception: an unmanaged exception was thrown out of a managed-to-native transition.


C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\\2.2.8-rel-28605-00\tools\Microsoft.NetNative.targets(801,5): error MSB6006: "ilc.exe" exited with code 4103.

C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\\2.2.8-rel-28605-00\tools\Microsoft.NetNative.targets(914,5): error : ILC has encountered an error. Refer to the .NET Native compatibility documentation and support information at for assistance.

**Note: Failures occurred randomly. Not always (e.g. approx. 2 builds failed in every 8 builds)


Please help us to resolve this issue.

0 Replies