Unable to compile UWP store app using fluent libraries
See original GitHub issueDescribe the bug
A UWP project incorporating the following NuGet packages:
- DocumentFormat.OpenXml (version 2.9.1)
- Microsoft.Azure.Management.Fluent (version 1.22.2)
- Microsoft.NETCore.UniversalWindowsPlatform (version 6.2.8)
Fails to build in Release config if the build is set to use the .Net native toolchain (required for Store submission).
Exception or Stack Trace
This is the output:
8>C:\Users\joelm\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): warning : MCG : warning MCG0007: Unresolved P/Invoke method 'libc!sysctl' for method 'System.Int32 Microsoft.DotNet.PlatformAbstractions.Native.NativeMethods.Darwin.sysctl(System.Int32*, System.UInt32, System.Byte*, System.UInt32*, System.IntPtr, System.UInt32)'. Calling this method would throw exception at runtime. Please make sure the P/Invoke either points to a Windows API allowed in UWP applications, or a native DLL that is part of the package. If for some reason your P/Invoke does not satisfy those requirements, please use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP APIs.
8>C:\Users\joelm\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): warning : MCG : warning MCG0007: Unresolved P/Invoke method 'ntdll!RtlGetVersion' for method 'System.Int32 Microsoft.DotNet.PlatformAbstractions.Native.NativeMethods.Windows.RtlGetVersion(Microsoft.DotNet.PlatformAbstractions.Native.NativeMethods.Windows.RTL_OSVERSIONINFOEX)'. Calling this method would throw exception at runtime. Please make sure the P/Invoke either points to a Windows API allowed in UWP applications, or a native DLL that is part of the package. If for some reason your P/Invoke does not satisfy those requirements, please use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP APIs.
8>C:\Users\joelm\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): warning : MCG : warning MCG0007: Unresolved P/Invoke method 'ntdll!RtlGetVersion' for method 'System.Int32 Microsoft.Azure.Documents.NativeMethods.Windows.RtlGetVersion(Microsoft.Azure.Documents.NativeMethods.Windows.RTL_OSVERSIONINFOEX)'. Calling this method would throw exception at runtime. Please make sure the P/Invoke either points to a Windows API allowed in UWP applications, or a native DLL that is part of the package. If for some reason your P/Invoke does not satisfy those requirements, please use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP APIs.
8>C:\Users\joelm\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): warning : MCG : warning MCG0007: Unresolved P/Invoke method 'libc!sysctl' for method 'System.Int32 Microsoft.Azure.Documents.NativeMethods.Darwin.sysctl(System.Int32*, System.UInt32, System.Byte*, System.UInt32*, System.IntPtr, System.UInt32)'. Calling this method would throw exception at runtime. Please make sure the P/Invoke either points to a Windows API allowed in UWP applications, or a native DLL that is part of the package. If for some reason your P/Invoke does not satisfy those requirements, please use [DllImport(ExactSpelling=true) to indicate that you understand the implications of using non-UWP APIs.
8> Generating code...
8> Interop code generated.
8> Generating serialization code
8> Compiling interop code
8> Generating System.Reflection.DispatchProxy proxy code.
8> Cleaning up unreferenced code
8> Generating native code
8>C:\Users\joelm\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : Error: NUTC301D:Internal Compiler Error: Invalid class variable '0' in signature while compiling method 'instance System.Boolean Microsoft.Azure.Management.AppService.Fluent.AppServiceCertificateImpl.Valid()'.
8>C:\Users\joelm\.nuget\packages\microsoft.net.native.compiler\2.1.8\tools\Microsoft.NetNative.targets(788,5): error : ILT0005: 'C:\Users\joelm\.nuget\packages\runtime.win10-x64.microsoft.net.native.compiler\2.1.8\tools\x64\ilc\Tools\nutc_driver.exe @"C:\Projects\Intact\PowerLine.CodeSolve\Solutions\ReAccess\Intact.PowerLine.ReAccess\obj\x64\Release\ilc\intermediate\MDIL\ReAccess.rsp"' returned exit code 1
10>Intact.PowerLine.ReAccess.Tests.Web -> C:\Projects\Intact\PowerLine.CodeSolve\Solutions\ReAccess\Intact.PowerLine.ReAccess.Tests.Web\bin\Release\netcoreapp2.2\Intact.PowerLine.ReAccess.Tests.Web.dll
10>Done building project "Intact.PowerLine.ReAccess.Tests.Web.csproj".
========== Rebuild All: 9 succeeded, 1 failed, 0 skipped ==========
To Reproduce
Create a new UWP project, add the Nuget projects noted in the Description section and build in Release config (make sure “Compile with .Net tool chain” is checked)
Code Snippet
N/A - no code needed to reproduce this error
Expected behavior
Successful build.
Setup (please complete the following information):
- OS: Windows 10 1809
- IDE: Visual Studio 2019
- Framework: UWP
- NuGet Packages:
- DocumentFormat.OpenXml (version 2.9.1)
- Microsoft.Azure.Management.Fluent (version 1.22.2)
- Microsoft.NETCore.UniversalWindowsPlatform (version 6.2.8)
Additional context
A UWP project will build in release with only the OpenXml package and will build in release with only the Azure.Management.Fluent package. The build fails when both packages are included. Since this involves another package (OpenXml), I have opened an issue on the project’s page: Open-Xml-SDK 595
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- Bug Description Added
- Repro Steps Added
- Setup information Added
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (1 by maintainers)
Top GitHub Comments
@Joel-Intact, from the diagnostic build output, there is no compilation errors related to Fluent as your original reported. What the latest situation here?
And you can check this link: https://developercommunity.visualstudio.com/content/problem/459927/how-to-solve-error-of-returned-exit-code-1-while-b.html to see whether this is the same as your diagnostic.
Thanks.