question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to compile UWP store app using fluent libraries

See original GitHub issue

Describe 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:closed
  • Created 4 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
yaohaizhcommented, Jul 25, 2019

@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.

0reactions
yaohaizhcommented, Jan 10, 2020

Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to Run UWP project - Developer Community
Workaround: Enabling the "Generate library layout" option inside the project properties -> Build page for all of my UWP class libraries seems to ......
Read more >
What's a Universal Windows Platform (UWP) app?
UWP apps use WinRT APIs to provide powerful UI and advanced ... Available from the Microsoft Store on all devices (or only those...
Read more >
Failed to submit UWP app with an error "You cannot ...
Failed to submit UWP app with an error "You cannot submit pre-compiled .NET Native packages" · UWP app project · UWP class library...
Read more >
Microsoft Says '.NET 5/6 Will Not Be Coming to UWP ...
Can't any more compare, I did some comparisons a looong time ago. Right now, my app compiles in about 1:45 min on a...
Read more >
Intro to UWP (Universal Windows Platform) Apps in C# ...
Along the way, we will talk about when you would build a UWP app, ... 41:11 - Demo app Unit tests 43:50 -...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found