question

SRBDDV-0035 avatar image
0 Votes"
SRBDDV-0035 asked SRBDDV-0035 commented

Msbuld command fails randomly in VS2019 - Runtime-generated FailFast: (7): Unhandled exception: an unmanaged exception was thrown out of a managed-to-native transition.


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\microsoft.net.native.compiler\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\microsoft.net.native.compiler\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 http://go.microsoft.com/fwlink/?LinkID=392869 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.

vs-msbuild
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DylanZhu-MSFT avatar image
0 Votes"
DylanZhu-MSFT answered SRBDDV-0035 commented

Hi SRBDDV,

You can try to upgrade the Microsoft.NETCore.UniversalWindowsPlatform package to latest version. The reference link: https://developercommunity.visualstudio.com/t/failed-to-build-uwp-package-ilc-error-ilc1004/66416

Best Regards,
Dylan


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

We've upgraded Microsoft.NETCore.UniversalWindowsPlatform to latest version & tried build.

Still no luck :(

2/3 build fails for every 10 builds

1 Vote 1 ·