I was working with Unity and Hololens and tried to establish connection to Azure Iot Hub via MQTT protocol. Microsoft provides a tutorial for getting started with Azure IoT Hub in C#, but unfortunately, I encountered a problem with the tutorial:
In the picture above, I have selected Microsoft.Azure.Device NuGet package for installation. I have tried version 1.0.0 and also the latest one available, 1.2.4. The projects were automatically generated by Unity and that is probably the reason, why I do encounter this problem. Which problem? After I try to install the selected NuGet, I encounter the following error:
Could not install package 'Microsoft.Azure.Devices 1.2.4'. You are
trying to install this package into a project that targets
'.NETFramework,Version=v3.5,Profile=Unity Full v3.5', 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.
I was like, "Hmm, I must have wrong .NET framework version. I wonder if I can change that..." I tried to go to project properties like this
Microsoft advises changing .NET framework from Properties context menu item:
https://technet.microsoft.com/fi-fi/library/bb772098(v=vs.90).aspx (4.24.2017)
https://msdn.microsoft.com/en-us/library/bb398202(v=vs.100).aspx (4.24.2017)
However, this feature must be blocked by something, because the view that is supposed to open flashes white and disappears immediately. I suppose Unity doesn't like people tinkering with project properties, but what else can I do? Incompatible .NET framework issue needs to be resolved, so that the NuGet package can be installed, but how do I do that?
In short, how to install Microsoft.Azure.Devices NuGet package for Unity?
Sorry, this isn't possible due Unity's restriction to .net 3.5.
To be exactly, they use a custom version of mono-2.
You could try the new (experimental) .net 4.6 settings in Unity 5.6.
https://forum.unity3d.com/threads/upgraded-mono-net-in-editor-on-5-5-0b4.433541/
Related
I am getting an error when I attempt to add a reference to the Microsoft.Sharepoint.dll into my Azure function class. It keeps giving me the following error:
Package Sharepoint 15.0.0 is not compatible with net462 (.NetFramework, Version=v4.6.2). Package Sharepoint 15.0.0 supports microsoftsharepoint (Microsoft.SharePoint,version=v0.0).
Also the Microsoft.Sharepoint.Client.Runtime has a similar issue.
Given this I have followed other advice to switch the targeting framework to 4 and 4.5 but all of these seem to fail similarly. What is the supported framework for this and how can I add it into an azure function. Also I am dealing with an on-prem instance of sharepoint so I cannot connect via the online apis.
The Microsoft.Sharepoint.dll have no dependencies so, it it no matter with framework. I test in my site and could install it correctly.
You could try to use the Package Manager console in Visual Studio to install instead of the Manager Packages tool for the project.
And if you use Manage Nuget Packages, delete Nuget's cache from the packages' manager configuration.
Good morning all,
I am following the instructions on the azure site for adding offline sync capability in a Xamarin.Forms application.
I have added the package to the PCL without issue but when trying to add to the iOS client project I am getting the following error:
Could not install package 'Microsoft.Azure.Mobile.Client.SQLiteStore 2.1.1'. You are trying to install this package into a project that targets 'Xamarin.iOS,Version=v1.0', 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.
My project is well established in terms of completed code base so I downloaded the getting started app to test from scratch and the same issue remains.
Please help
Jordan Mazurke
Looks lite something is wrong with package 2.1.1.
Install version 2.1.0 instead and it should work!
See also Unable to install Microsoft.Azure.Mobile.Client.SQLiteStore 2.1.1 into Xamarin.iOS project with NuGet 2.12
I'd would like to use RabbitMQ .I find nugget .NET but i get error :
You are trying to install this package into a project that targets 'MonoAndroid,Version=v6.0', 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 implement connection with RabbitMQ . Manual copy source ?
The issue is that the RabbitMQ nuget package needs the full .NET Framework. Since PCLs and Xamarin Android projects don't provide the full framework, it won't work. One option is to take the source code and build it in a PCL like you suggested (eg see https://forums.xamarin.com/discussion/49858/using-rabbitmq-amqp-with-xamarin-forms). Depending on what you want to do, I think using the HTTP API might be worth considering too.
Rabbit MQ is now also built as a .net standard 1.5 libraries. https://www.nuget.org/packages/RabbitMQ.Client
You should be able to pull it into the latest Xamarin without any problems (taking into account that your xamarin build is set up to support version .net standard 1.5 or version 2.0).
Xamarin forms added support for standard libraries from version 2.3.5-pre
https://devblogs.microsoft.com/xamarin/building-xamarin-forms-apps-net-standard/
UWP is easily supported with .net standard 2.0 and is compatible with the 1.5 libraries.
Since a recent update of Nuget Package Manager (from 2.9 to 3.2.0 I guess), installing package via nuget doesn't add addition files of the package anymore. It just adds the libraries only, update the "project.json" and something like that.
For example: Installing MVVMLight to a project will add Models, ViewModels and Views folder to project. Also, it will add a MainViewModel.cs, ViewModelLocator.cs to ViewModels folder. Now none of these files/folders are added to project.
Any suggestion will help
Since Nuget 3.1 this is no longer supported: https://docs.nuget.org/release-notes/nuget-3.1. One of the main reasons is that packages can copy in files on install, but you're not sure what to do with it on uninstall (as content might have changed manually). But do note that there's an open issue to maybe re-enable this functionality.
Laurent Bugnion of MVVM Light is aware of this issue as well:
Caution: Full package in Windows 10 Universal applications (UWP)
There is a known issue when you install the “mvvmlight” package in
Windows 10 universal applications. The Nuget team unfortunately
changed the way that Nuget works for this framework, and it doesn’t
allow installing additional files, or running scripts anymore. Because
of this, installing the “mvvmlight” package in Windows 10 UWP
applications creates the exact same result as installing the
“mvvmlightlibs” package. Because running a script is not allowed, it
is not even possible to warn the user.
I will publish more detailed information on how to add the scaffolding
to a Windows 10 UWP application manually. Stay tuned.
As of today, he didn't post a full guide yet, but you could try to run the packaged powershell script manually.
I couldn't find any other questions on this...so I must be doing something wrong. I have never used NuGet before, so my problem could very well be there.
Anyways, I am making a WP8 app in VS2012. I went Project > Manage NuGet Packages > Online > Facebook. It is version 6.4.0. When I hit install, I get the following error:
Could not install package 'Facebook 6.4.0'. You are trying to install
this package into a project that targets 'WindowsPhone,Version=v8.0',
but the package does not contain any assembly references that are
compatible with that framework. For more information, contact the
package author.
Any idea how to resolve this?
I had the same problem, for me updating Nuget package installer worked. Initial version was 2.0 and it got upgraded to 2.5. Go to Tools=> Extensions and Updates => Updates => Visual Studio Gallery. There you can see update available for Nuget installer. After updating Nuget try installing facebook and facebook client packages.Hope this works....
The error you're seeing means that the package you tried to install for Nuget is incompatible with WP7/8 projects. Look at this Nokia article that explains how to use a modified version of the Facebook Graph API in a WP7/8 project.
I also faced this issue but, the previous version works fine.
go to tools => library package manager=>package manager console
and type
Install-Package Facebook -Version 5.3.2.0
and press enter.
Hope this will help :)