简体   繁体   English

错误MCG0004:InternalAssert断言在发布模式下构建UWP应用程序时失败

[英]Error MCG0004:InternalAssert Assert Failed when building UWP app in release mode

I have an UWP app written in C# which builds (VS 14.0.25425.01 Update 3 on Windows 10.0.14393, target version of the project is build 14393) and runs in Debug mode, but fails to build in Release mode with the following error: 我有一个用C#编写的UWP应用程序(在Windows 10.0.14393上为VS 14.0.25425.01 Update 3,项目的目标版本为build 14393)并在Debug模式下运行,但无法在Release模式下构建,但出现以下错误:

Microsoft.NetNative.targets(640,5): error : MCG0004:InternalAssert Assert Failed: field not found during [UNKNOWN] Microsoft.NetNative.targets(640,5):错误:MCG0004:InternalAssert Assert Failed:在[UNKNOWN]期间找不到字段

There are no further details, except for two warnings before, which I am not sure whether they are related to the problem: 没有进一步的细节,除了之前的两个警告,我不确定它们是否与问题有关:

Resources.System.Linq.Expressions.rd.xml(35): warning : ILTransform : warning ILT0027: Method 'CreateLambda' within 'System.Linq.Expressions.Expression' could not be found. Resources.System.Linq.Expressions.rd.xml(35):warning:ILTransform:warning ILT0027:找不到'System.Linq.Expressions.Expression'中的方法'CreateLambda'。 Resources.System.Linq.Expressions.rd.xml(91): warning : ILTransform : warning ILT0027: Method 'ParameterIsAssignable' within 'System.Linq.Expressions.Expression' could not be found. Resources.System.Linq.Expressions.rd.xml(91):warning:ILTransform:warning ILT0027:找不到'System.Linq.Expressions.Expression'中的方法'ParameterIsAssignable'。

Any suggestions what the issue could be related to? 有什么建议可以与这个问题有关吗?

This error will occur if you're using the Beta package for .NET UWP tools with VS 2015. The Beta package is only supported on 2017 as there are changes to how deployment/debugging work that we rely on. 如果您在VS 2015中使用.NET UWP工具的Beta软件包,则会出现此错误。仅在2017年支持Beta软件包,因为我们依赖的部署/调试工作方式有所变化。 You should be able to avoid the issue by downgrading from "Microsoft.NETCore.UniversalWindowsPlatform": "5.3.0-beta2" to "Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2" 您应该能够通过从"Microsoft.NETCore.UniversalWindowsPlatform": "5.3.0-beta2"降级为"Microsoft.NETCore.UniversalWindowsPlatform": "5.3.0-beta2"来避免此问题"Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2"

edit: 5.3.0 has been published and works with VS2017 RC3+. 编辑:5.3.0已发布,可与VS2017 RC3 +配合使用。 More information here: https://blogs.msdn.microsoft.com/dotnet/2017/01/30/announcing-net-core-net-native-and-nuget-updates-in-vs-2017-rc/ 更多信息请访问: https//blogs.msdn.microsoft.com/dotnet/2017/01/30/announcing-net-core-net-native-and-nuget-updates-in-vs-2017-rc/

Disclaimer: I work on the .NET Native compiler+runtime team. 免责声明:我在.NET Native编译器+运行时团队工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM