I have Windows UWP foreground app running on my raspberry (windows 10 iot core). I want to use Iot.Device.Bindings nuget package to capture data from various sensors (e.g. bme680). But looks like this package is unsupported on UWP:
NU1202: Package Iot.Device.Bindings 1.2.0 is not compatible with uap10.0.17763 (UAP,Version=v10.0.17763). Package Iot.Device.Bindings 1.2.0 supports:
- net5.0 (.NETCoreApp,Version=v5.0)
I tried to create backroung job for iot core, but same error.
Can someone suggest approch how to achive that?
Thanks in advance!
Yes, the Iot.Device.Bindings package does not support UWP on Windows IoT Core but works for .net core. Since the library uses APIs in namespace System.Decive.. For UWP app, you need to use APIs in namespace Windows.Device.. At the moment, I can not find a package which is implemented for various sensors. Here are two suggestion for that:
Create a .net core app which uses the Iot.Device.Bindings nuget package, and build a channel to send the data from .net core app to your UWP app, such as tcp, or web API.
Imeplement the library for UWP by referring the source code.
Related
Is it possible to use GRPC C# library with a Windows Phone App? When I try to install GRPC through NuGet I receive the following error:
Error Could not install package 'Grpc.Core 1.0.0'. You are trying to install this package into a project that targets 'WindowsPhoneApp,Version=v8.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. 0
Has anyone had any luck installing GRPC C# library for a windows phone app?
As of now, Windows Phone Apps are not supported by gRPC C#. Technically, supporting them would be possible but we are not sure it's worth the work at this point - we have different priorities (User experience, performance and supporting other platforms).
Here's a github issue that tracks the discussion: https://github.com/grpc/grpc/issues/7859
I'm working with a .NET core app, and I see some Azure packages are not compatible, for example NotificationHubs and SendGrid:
Package Microsoft.Azure.NotificationHubs 1.0.5 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0)
The dependency SendGrid.CSharp.HTTP.Client 2.0.4 does not support framework .NETCoreApp, Version=v1.0
I only tried adding NotificationHubs and SendGrid. I haven't even tried any ActiveDirectory packages yet.
Does anyone have any idea if some of these packages will be compatible soon? Or maybe I'm doing something wrong? Or is there a way in a .NET core app to reference an older package?
Thanks!
[Update 11/30/2017] Microsoft.Azure.NotificationHubs 2.0.0-preview1 compatible with .NET Core has just been published.
[Original answer] As of mid-July 2016 Azure Notification Hubs SDK is not available for .NET core. The product team is working on it, but there's no ETA yet.
At the moment, there are two ways to work around it:
Use WindowsAzure.Messaging.Managed Nuget package as described in Getting started with Notification Hubs for Windows Universal Platform Apps
Through REST APIs. (List of methods.)
If you are working on Azure, you are not required to use netcoreapp to use ASP.NET Core. You can still use ASP.NET Core with the Full Framework by targetting net461 instead of netcoreapp1.0 and it will still work, Azure has the Full Framework available and they are both compatible with the same version of NetStandard.
We have several Web Apps that run on netcoreapp1.0 and others on net461 due to package dependencies (like Azure SDKs), and all run on ASP.NET Core.
When the product team start releasing the .Net Core App compatible packages, just re-target netcoreapp1.0 and add the Microsoft.NETCore.App package and it will keep working.
Sample github repo of an Azure Web App using ASP.Net Core with Full Framework
I tried to install NetMQ to my xamarin application.
Because NetMQ depends on AsyncIO, this package could not be installed and show me the following error:
Could not install package 'AsyncIO 0.1.18'. You are trying to install this
package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111',
but the package does not contain any assembly references or content files
that are compatible with that framework. For more information, contact the package author.
How can I reesolve this issue?
The AsyncIO 0.1.18 NuGet package and the NetMQ 3.3.3.1 NuGet package only contain assemblies for .NET 4.0 and .NET 3.5 so you cannot install it into a portable class library project nor a Xamarin project.
Your options include:
Port those libraries to the Xamarin frameworks.
Only use these libraries on the server side. Your Xamarin project then connects to your server using a supported way, such sending json messages over http.
Find another library that does support the Xamarin frameworks.
NetMQ now target Xamarin IOS and Android, you can download here:
https://www.nuget.org/packages/NetMQ/4.0.0.3-rc3
I have created a Portable class library in Xamarin and want to use it for an android app. I want to use the HttpClient within this PCL. I have added the Microsoft Http Client libraries from the NuGet Package manager. I can now see the .Net portable subset added to my references. But somehow I still cannot use the HttpClient and it does not show in the .Net portable subset as well.
Also, my Current profile of the PCL is 4.0-Profile 158. If I change the profile to 4.5, Xamarin crashes and does not open the solution
Can anyone help me with this?
Thanks
The simple solution is to target .NET 4.5, Windows Store apps (Windows 8.1), Xamarin.iOS, and Xamarin.Android (4.5-Profile7). Then you won't need the HttpClient NuGet package to get those APIs.
If Xamarin is crashing when you try to select a 4.5 profile, please make sure you're using the latest version and then report the bug with details about how to repro it and what happens.
Also the HttpClient NuGet package should allow you to use HttpClient from PCL profile 158. Make sure you're using the latest version of NuGet. ".NET Portable Subset" should always appear in your references for a PCL, that's not related to the NuGet package. When you install the HttpClient NuGet package, you should also see references to System.Net.Http and other assemblies in your references.
Is it possible to inlcude AzureMobileServices client in a PCL that includes WP8?
I used to have a PCL project that had it up until I upgraded it to VisualStudio 2013.
The required PCL is profile78: .NET4.5, Windows Store apps (Win8), WP8, and the Xamarin twins.
I tried following this recommendation from Xamarin to reference the component's DLL directly, however the DLL was compiled for profile7 (that does not include WP8).
Yes. Make sure you are using at least version 1.1.5 of the Mobile Services NuGet package or Xamarin Component and you will be able to successfully use it from a PCL that includes WP8. For a tutorial on how to do this, see here.
It looks like their nuget package only includes directories for Store, .Net 4.5, Wp8, and Portable-Store+.Net 4.5. However if I ildasm the dll in the portable folder I see it was built for Profile78, which does support phone.
This looks like a bug with the WindowsAzure.MobileServices.nupkg nuspec authoring.