I'm trying to make a Netduino communicate with Azure. I've found several other projects and in their source code they use the package Microsoft.WindowsAzure like any other Azure project. In my project, though, it claims that the package name cannot be resolved.
I found somewhere that I had to go into Manage NuGet Packages and install it, but when I try, it halts the installation at JSON and rolls it all back.
This is the error message I get:
Adding 'Newtonsoft.Json 5.0.8' to Netduino.
Uninstalling 'Newtonsoft.Json 5.0.8'.
Successfully uninstalled 'Newtonsoft.Json 5.0.8'.
Install failed. Rolling back...
Could not install package 'Newtonsoft.Json 5.0.8'.
You are trying to install this package into a project that targets '.NETMicroFramework,Version=v4.2',
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.
What haven't I done? What am I doing wrong?
You can use NETMF.Json if you are running NETMF 4.2 or later
NETMF.Json on GitHub
I use it in my realtime pub/sub client for NetDuino here XSockets NetMF client
AFAIK Newtonsoft.Json is not compatible with .NET Microframework
"Supports .NET 2, .NET 3.5, .NET 4, Silverlight, Windows Phone and Windows 8" (from http://json.codeplex.com/ )
Infact you get this error:
You are trying to install this package into a project that targets '.NETMicroFramework,Version=v4.2',
but the package does not contain any assembly references or content files that are compatible with that framework.
Related
I am working on a Visual Studio solution with two projects which I will call Red.dll and Blue.dll for the purpose of this question. Note that Red.dll depends on Blue.dll. These are both compiled in .NET Standard 2.0 with the output type of "Class Library".
I added the dll of each project to a common NuGet package called "Red" using NuGet Package Explorer. It has the following structure:
lib
- netstandard2.0
- Red.dll
- Red.xml
- Blue.dll
- Blue.xml
Here is the problem: When I attempt to install this NuGet package to a .NET Core application, I receive the following error:
Error NU1101: Unable to find package Blue.dll. No packages exist with this id in source(s): Desktop, Microsoft Visual Studio Offline Packages, nuget.org
Blue.dll is not a NuGet package. I don't know why it thinks it is.
Blue.dll is located directly beside Red.dll.
There are no external dependencies other than Newtonsoft.Json which is irrelevant.
And to reiterate, Blue.dll is NOT a NuGet package dependency. I realize if you use the "Pack" feature in Visual Studio it will create a dependency, but I created this NuGet package manually to avoid that.
But most importantly: This all works perfectly in .NET Framework! The NuGet package successfully installed, both dlls are referenced, the code builds without any errors, and the XML documentation is accessible.
Why does this work in .NET Framework but not .Net Core?
I haven't found anything else online about this particular problem.
I'm getting this error when using maps in Android:
System.MissingMethodEsception: Method
'Xamarin.Forms.maps.Android.MapRenderer.OnCameraChange' not found.
And I've read that you can update the nugetpackage to fix the issue. However, I cannot install it due to this:
Could not install package 'TK.CustomMap 2.0.1'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile78', 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.
The updates of packages installs just find in iOS and Android but not for PCL. I've tried to remove all the packages and then tried to add TK.Customs nuget package but this same issue.
Also tried to install it on a fresh project and that installed just fine. Just cant get it to install on my old project.
Here is the whole error message when trying to update package:
Attempting to gather dependency information for package 'TK.CustomMap.2.0.1' with respect to project 'Vernamo', targeting '.NETPortable,Version=v4.5,Profile=Profile78'
GET https://api.nuget.org/v3/registration3-gz-semver2/tk.custommap/index.json
OK https://api.nuget.org/v3/registration3-gz-semver2/tk.custommap/index.json 175ms
Total number of results gathered : 29
Gathering dependency information took 232 ms
Summary of time taken to gather dependencies per source :
https://api.nuget.org/v3/index.json - 204.03 ms
Attempting to resolve dependencies for package 'TK.CustomMap.2.0.1' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'TK.CustomMap.2.0.1'
Resolved actions to install package 'TK.CustomMap.2.0.1'
Found package 'TK.CustomMap 2.0.1' in '/Users/holger/Downloads/Vernamo/packages'.
For adding package 'TK.CustomMap.2.0.1' to project 'Vernamo' that targets 'portable45-net45+win8+wp8'.
Install failed. Rolling back...
Package 'TK.CustomMap.2.0.1' does not exist in project 'Vernamo'
Executing nuget actions took 52 ms
Could not install package 'TK.CustomMap 2.0.1'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile78', 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.
The pre-release version (at least pre2) of TK.CustomMap supported all platforms (see here), anyway, as of pre3 (see here), obviously the support for all platforms was dropped in favor of .NET Standard (1.1 in this case).
The profile you are using in your PCL does not seem to be compatible with .NET Standard 1.1, hence NuGet fails to add the reference. You may try to switch to another profile (.NET 4.5.1 for example), but I don't know if that would help. Another option would be to migrate your projects to .NET Standard. It's kind of a stupid, repetetive task, but it's possible.
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/
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 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