Azure / azure-cosmos-table-dotnet

.NET SDK for Azure Cosmos Table API
14 stars 6 forks source link

TypeLoadException with .NET Native compiled UWP app #49

Closed sa3eedo12 closed 4 years ago

sa3eedo12 commented 4 years ago

SDK version 1.0.7 and 2.0.0 Issue reproduce steps Create a new UWP project targeting version 1903 and minimum version 18362 Install Microsoft.Azure.Cosmos.Table any of the above versions Use the library from the UWP project Build in release mode and run with the debugger Whether the issue is consistent or sporadic Consistent Environment Summary SDK Version: Windows 10 SDK (10.0.18362.0)

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. MCG : warning MCG0007: Unresolved P/Invoke method 'libc!uname' for method 'System.Int32 Microsoft.Azure.Documents.NativeMethods.Unix.uname(System.IntPtr)'. 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. 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.

sakash279 commented 4 years ago

Could you take a look at the issue which has been discussed here: https://github.com/Azure/azure-cosmos-dotnet-v2/issues/625

It is on a dependency module: Microsoft.Azure.Documents, and being tracked there.