Reputation: 404
Just noticed that UWP applications do not contain most of assemblies they reference. Instead they require nuget manager on installation and as I understand somehow install required dependencies directly into GAC. I just called Install-Package and faced the prompt to install nuget.
So in my app I have win32 appservice which is called as trusted app from uwp. It has dependency on Newtonsoft.Json. But win32 application crashes with error that assembly can't be located. Of course it can't be located as it's not in the application folder. But how it should work? Why it's not located in GAC? The only place where this assembly exists is C:\Windows\WinSxS\msil_hyperv-ux-ui-newtonsoftjson_31bf3856ad364e35_10.0.17134.1_none_2490c36295ddbc03 which is GAC storage. But it's still not resolved. So how it should work?
UPD: Here is the sample code to reproduce the problem: github.com/GDreyV/uwp-assemblies-test To reproduce it you need to switch to Release configuration, right click on Uwp project and choose Store - Create App Packages. After package is ready just install it and run.
Upvotes: 1
Views: 449
Reputation: 404
As Lex Li pointed out UWP uses .NET Native which includes ahead-of-time (AOT) compilation process. It means:
All dependencies on the .NET runtime are removed, so your end users will never need to break out of their setup experience to acquire the specific version of the .NET Framework your app references. In fact, all the .NET dependencies are packaged within your application, so the behavior of your app shouldn’t change just because there’s a change in the .NET Framework installed on the machine.
Upvotes: 1