uwp-desktop | Lets .NET desktop apps invoke UWP APIs | Runtime Evironment library
kandi X-RAY | uwp-desktop Summary
kandi X-RAY | uwp-desktop Summary
Lets .NET desktop apps invoke UWP APIs
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of uwp-desktop
uwp-desktop Key Features
uwp-desktop Examples and Code Snippets
Community Discussions
Trending Discussions on uwp-desktop
QUESTION
ANSWER
Answered 2021-May-06 at 07:09TargetInvocationException when using uwp bluetooth APIs in .NET 5 winforms app
I'm afraid you can't run it in Windows 8.1 system, please refer BluetoothLEAdvertisementWatcher
document, the support lowest version is Build 10240, and it will not work in Windows 8.1 system.
QUESTION
I'm creating a desktop UWP app and I need to set a global low level mouse hook to detect and change the position of it when it is moved to certain locations of the screen.
It works fine while my app's window is in focus and the values get logged correctly to the output window(meaning that the hook is working correctly).
This UWP app isn't going to be on the store and will only be used on a Windows 10 desktop (1903+).
I've tried calling SetWindowsHookEx
on a different thread (which didn't do anything).
Tried also passing a thread ID when calling SetWindowsHookEx
to no avail.
Also tried using the following restricted capabilities to prevent the app to suspend when not on focus: extendedExecutionUnconstrained
and extendedBackgroundTaskTime
along with the PreventFromSuspending
method shown here.
Another thing I tried was to set uiAccess
to true on the app manifest, which also didn't work.
The global hook is supposed to work even when the app isn't in the foreground, but instead it just works when it has the active window focus.
...ANSWER
Answered 2019-Sep-06 at 00:41UWP apps are running in the sandbox, so that doesn't sound strange. If you think a bit it is a security problem if the app can receive such an input and as 'Security' is listed as No.1 characteristic of the UWP this behavior is expected.
QUESTION
I''ve fully and detailed described problem and question in this topic System.NullReferenceException in AppServiceResponse and System.BadImageFormatException of UWP with WPF desktop bridge package, but still have no found answer, what can cause this failure.
Topic link to Windows Dev Center above describes assembly, shows all used code with examples, including attempts to fix problem, and other details. So I will put only basic part of task in this stackoverflow topic to avoid text overload in post and focus only on System.BadImageFormatException, which provokes App.Connection null in Windows Application Package Project with connection from UWP to WPF application, created according to UWP with Desktop Extension – Part 3 lesson, (sending of request to desktop extension, read registry key values, and sending of request from desktop extension to UWP, handle requests from desktop code).
I've tried fix it different ways (also described above), but can't find any clue of reason, at least to know where to look for problem, maybe I've missed something, but I can't find related useful answers anywhere in internet
This is the message, but the System.Runtime.WindowsRuntime.dll
is already in references:
System.BadImageFormatException HResult=0x80131058 Message=Could not load file or assembly 'System.Runtime.WindowsRuntime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=...' or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058) Source=WpfApp1
StackTrace: at WpfApp1.MainWindow.d__4.MoveNext() in C:\Users\User\Desktop\UWP\App\WpfApp1\MainWindow.xaml.cs:line 58 at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at WpfApp1.MainWindow.InitializeAppServiceConnection() at WpfApp1.MainWindow..ctor() in C:\Users\User\Desktop\UWP\App\WpfApp1\MainWindow.xaml.cs:line 37 Inner Exception 1: BadImageFormatException: Cannot load a reference assembly for execution.
Any advice, guide or example would be very helpful
EDIT 1: **************************************************************************************************
I've tried all this combinations below two ways Debug and Release, as well as changed Solution platform "compiler settings", from menu bar of VS target from “Any CPU” to “X86 ” and vice-versa as shown in System.BadImageFormatException: Could not load file or assembly [duplicate], and from Solution->Properties->Configuration Properties->Configuration->Project contexts
as well as from Project->Properties->Build->Platform target
, but functionality and failure equally occurs in all cases:
Current Configuration Properties:
...ANSWER
Answered 2019-Jul-13 at 18:11This exception occurs when referencing the Windows Runtime libraries incorrectly from the non-UWP project (WPF, Winforms, Console, etc.). Be sure to reference them as follows
- In the "Add Reference …" dialog click "Browse …" and set the filter to "All Files (*.*)"
- Navigate to "%ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework.NETCore\v4.5\System.Runtime.WindowsRuntime.dll"
- Navigate to "%ProgramFiles(x86)%\Windows Kits\10\UnionMetadata\{TargetVersion}\Windows.winmd"
QUESTION
I am setting up a UWP-Desktop bridge and for that I need the "Windows Desktop Extensions for the UWP".
The problem is, I don't have the entry in my reference window to include the extensions.
Windows 10 SDK v. 10.0.17763.132
http://prntscr.com/nibwjd - So should be and that's my reference window: http://prntscr.com/nibx1g
...ANSWER
Answered 2019-Apr-30 at 18:37It works now. The problem was the path of my Windows Kits. The right path for the kits: C:\Program Files (x86)\Windows Kits\10
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install uwp-desktop
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page