How to create a UWP Package that`s shipping Microsoft.NET.CoreRuntime.1.0 with it - deployment

I`m struggling with the following issue:
I try to deploy my uwp app with a Mobile Device Management System (MobileIron). it's only accepts .appxbundle, no .appxupload files. When i try to install/deploy the app on a device, i get the error
Can not install package XY because the package xy has a dependency to Microsoft.NET.CoreRuntime.1.0. This package is needed for the installation. Deploy this Framework together with your package
(my custom translation ;) )
The problem is, I dont know how to create a package, that's shipping the needed CoreRuntime within. When i create a DEBUG Package, i get a appxbundle and a folder with the missing CoreRuntime.appx, but only the powershell script is shipping the CoreRuntime Framework to the Device, not the bundle itself.
When i create a RELEASE Package, it`s running agains .NET Native, in this case i have no CoreRuntime...
Hope i explained my problem good enought and someone can help me or give me a hind.

You need to enable .NET Native, From your Project Properties:
Make sure that your configuration is for Release. And check
Compile with .NET Native tool chain
and
Optimize code
finally make sure to create your packages from Store->Create App Packages. With the following configurations:

Related

Microsoft.MixedReality.QR is nonexistent despite NuGet installation

I am working on a project in MixedReality using mainly MRTK and its features. I found out that MRTK can use QR codes to read data, and I wanted to use it and try multiples ideas.
The problem is that, currently, is seems any QR feature is nonexistent in my project.
I Installed the NuGet package Microsoft.MixedReality.QR and its corresponding Microsoft.VCRTForwarders.14 package, as indicated in
https://localjoost.github.io/Reading-QR-codes-with-an-MRTK2-Extension-Service/
But anything I try in code, from my project, will tell me in the console window that the namespace could not be found, and all cascading items (properties, classes, functions) could not be found either, none of them.
It is weird since everything should be installed and up to date ( I verified this directly in Visual Studio and everything is there).
Any kind of help would be much appreciated, thanks !
For Unity projects, you need to import NuGet for Unity to install Mixed Reality QR NuGet package. Meanwhile the tutorial you are referring is not an official document. Some types/classes are defined by the author and are not included in Microsoft.MixedReality.QR namespace.
Please refer to the new QR sample on https://github.com/yl-msft/QRTracking and all the C# API references are listed on QR Code tracking API reference
I've been developing an app that uses QRcode on the hololens as well. I ran into that issue before, and the console seemed to throw that error for me because I was using the wrong version of the MRTK services in the Microsoft Mixed Reality Feature Tool. I would recommend using version 2.6.1 for all your services. Do you by any chance have a problem where "QR tracking is not supported" for the Unity Project you are building?

Failed to build module 'XXX' from its module interface while creating xcframework

Currently I am working in a framework project to distribute to a client we have. The Framework has SPM dependencies and I wanted to create an XCFramework from it. I found the scripts to archive and generate the XCFramework with the xcodebuild tool. The problem is that the generation is not working and I get the following error Failed to build module 'XXX' from its module interface; it may have been damaged or it may have triggered a bug in the Swift compiler when it was produced. I don't know if it is possible to build a framework with SPM dependencies as an XCFramework I was trying to distribute it as binary framework to protect our source code. I previously looked for this but couldn't found any information in the matter. Can somebody help me?
One solution seems to add #_implementationOnly import for the modules from the third-party SDKs. This should fix your XCframework error if you aren't using anything from that SDK as part of your module's public interface.

ModernHttpClient Not Compartible with Web Appication Project

i am currently using Restclient to send request via web api for xamarin, it works well with windows and ios but i doesnt work for andriod , i searched and found a nuget package that will help, called ModernHttpClient,so it changes my code from var httpclient = new HttpClient(); to var httpClient = new HttpClient(new NativeMessageHandler()); but when i install it for the web application i keep getting an error stating the package is not compatible with the project. but it installs ok in android,ios and windows. i tried uninstalling it from the web application but i doesnt work in the code unless it appears in all the project.
so i want to find the reason why the package is not compatible with the web appication or a solution to the Restclient request not working on android .
Unfortunately the product page for modernhttpclient on nuget.org doesn't list any dependencies, but changing the domain name of the URL to use fuget.org instead of nuget.org lists monoandroid, monotouch, portable-net45+winrt45+wp8+wpa81, and xamarin.ios10. Therefore, these are the target frameworks that the package supports.
Another way to check what TFMs (target framework monikers) a package supports is to find/download the nupkg and then open it as a zip file, or use NuGet Package Explorer to look for subfolders under lib/.
You didn't say what target framework your web app is using, but this is where things start getting very complicated and I don't understand it very well. .NET Framework TFMs are compatible with other .NET Framework TFMs of lower versions. Similarly .NET Core TFMs are compatiable with other .NET Core TFMs of lower versions. .NET Standard is a whole other complication. NuGet also supports fallback or alternate TFM compatibility, to allow .NET Core apps to use libraries targetting .NET Framework, but it's a best guess and might fail at runtime (maybe it's even possible to fail to compile, I'm not sure, but restore will succeed with a warning). Given you're not getting the warning, but instead an error, it suggests to me that portable-net45 is not compatible with net45 and therefore probably isn't compatible with whatever target framework you're using with your web app (unless your web app is targetting net40 or earlier).
Having said all that, when I was looking at the package to see which frameworks it targets, I saw that the whole point of the package is to use the platform native HTTP stack, instead of Xamerin's HTTP stack on the mobile platforms. Your web app isn't running on a mobile platform, it's running on either .NET Core or .NET Framework, so you shouldn't need the package. I suggest you use #if, #else and #endif to use NativeMessageHandler only on Android and IOS, and then use the default HTTPClient constructor (or use HttpMessageHandler) on other platforms.

Can a Yocto recipe be built using the SDK?

I have a Yocto project that takes quite some time to compile. The final image is meant to run my application and as such, I have a custom recipe in my own layer.
Since building the whole Yocto image takes a couple of ours, I do build an SDK so I can cross-compile my application and transfer the binary to the running device for testing.
Instead of compiling the binary and having to transfer it manually to the device,
can I use the Yocto recipe I've written for my application with the SDK so that I can "call" its do_package()? If other devs could build the .deb (assuming PACKAGE_CLASSES = "package_deb" in local.conf) simply from the SDK that could simplify greatly our workflow.
Thanks!
Huh, bluelightning beat me to the punch. That'll teach me for not hitting refresh. Anyhoo, here's my 2ยข:
Yes, have a look at devtool. The goal of the devtool script is to improve and simplify the development of software for target devices.
First, have your developers install the extensible SDK (eSDK), which is built using this command:
bitbake -c populate_sdk_ext my-image-name
Once you source this SDK, run these commands:
devtool modify my-recipe-name
...make your changes to [sdk]/workspace/source/my-recipe-name...
devtool build my-recipe-name
devtool package my-recipe-name
This should produce a package of your app in [sdk]/tmp/deploy/rpm/[arch]/my-recipe-name, which can then be deployed to the target machine.
Also, have a look at devtool deploy-target if your target machine has network connectivity.
If you give me some more details on your setup I may be able to help more. Hope this at least gets you pointed in the right direction.
This is really what the Extensible SDK is designed to do - provide a pre-built and pre-configured environment and allow you to build applications and other components in pretty much the same way they are built with the full build system. You can even deploy output files over to the target device easily if an ssh server is running on the target.
You can build the extensible SDK with the following command:
bitbake -c populate_sdk_ext <imagename>
For more information you may wish to read the new SDK manual.

Undesrscore.js library is not working with Ionic based MobileFirst project

I have created hybrid application with mobilefirst using ionic. I have included underscore.js library in my project. When I try to access methods of underscore, I get errors like underscore is not defined
If you mean that you have created an app using MobileFirst Studio - that is not the recommended path. The recommended path is to create a Cordova application using the MobileFirst CLI. You can then combine this with Ionic. This approach is more fool-proof.
You can follow these guides:
https://www.raymondcamden.com/2015/03/23/working-with-ibm-mobilefirst-and-the-ionic-framework/
https://mobilefirstplatform.ibmcloud.com/blog/2016/01/13/ionic-hybrid-mobile-app-using-mobilefirst-platform-7-1-cli/
Note that you did not mention the actual error you have received. Without this, the question is moot as there can be a number of possibilities. Please actually mention the error you got.