"Could not install package 'SocketIO4Net.Client 0.6.26'. You are trying to install this package into a project that targets
'WindowsPhoneApp,Version=v8.1".Getting this error while installing the library..Please help me to find an appropriate library..
This message means that you try to install a library that is not compatible with Windows Phone 8.1.
Lookat that nuget package shows only a .net 4.0 library:
socketio4net.client.0.6.26\lib\net40
which can be only used in Desktop .Net 4.x (40, 4.5.x, 4.6.x) projects.
You need to use a WinRT compatible lib that supports Phone 8.1.
Related
I'm having troubles while trying to add the Metadata of Autofac. I have to install the package "Autofac Extras: Metadata Attribute Support" which need Autofac.Mef. When installing this package, I get a message saying that I try to install Autofac.Mef 4.0.0 in a project targeting «portable-net45+win+wpa81» and that the package doesn't contain any file supporting this. (Same message with Autofac.Mef 3.0.3).
I could probably find a way to make my project work without Autofac's Metadata but I don't understand why this package isn't compatible with Windows Phone 8.1. Is there a solution to this issue?
Thanks in advance
Thomas
If you download the Autofac.Mef package manually and then open it up in NuGet Package Explorer you'll see that the Autofac.Mef package only targets .NET 4.5 apps - you can't use it in Windows Phone.
The reason for this is that the original framework MEF is only compatible with the full .NET framework. There's a "lighter weight" MEF 2 framework that is compatible with Windows Phone 8.1 but that's not the one Autofac.Mef works with.
There's no way to fix it. There's also no current plan to switch Autofac.Mef to using the Microsoft.Composition package.
has anyone been able to add LightInject to windows phone 8.1 project. I get an error
Could not install package 'LightInject 3.0.2.0'. You are trying to install this package into a project that targets 'WindowsPhoneApp,Version=v8.1', but the package does not c
ontain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
Thank you.
The LightInject NuGet packages has been updated to support Windows Phone 8.1. This will be published to the official NuGet feed as soon as possible.
Best regards
Bernhard Richter (Author of LightInject)
I am making a Windows Phone 8 application, however because I would like at some point to also publish this application for Windows 8.1 store I made the effort to factor out the application logic into a portable class library. All good so far.
Now being a good boy I want to use an IoC container, unity by preference (since I am familiar with it in desktop and Win Phone 8 only apps)
So here's my problem; the NuGet Unity package will not install into my portable application with this result:
Installing 'Unity 3.0.1304.1'.
Successfully installed 'Unity 3.0.1304.1'.
Adding 'Unity 3.0.1304.1' to Logic.
Uninstalling 'Unity 3.0.1304.1'.
Successfully uninstalled 'Unity 3.0.1304.1'.
Install failed. Rolling back...
Could not install package 'Unity 3.0.1304.1'. You are trying to install this package into a
project that targets 'portable-net45+wp80+win', 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.
So is there a unity that works with a PCL? or is this just a shortcoming of the NuGet package?
I failed to find any useful documentation on the P&P website to indicate what platforms it is compatible with, but I know it does support WP8 at the least since the NuGet package is quite happy with libraries targeting just that.
Any guidance from the community would be very welcome here I don't want to abandon using a PCL for my app logic if I can avoid it, but if it comes down to a toss up between that and NuGet for package management I will in order to keep the NuGet goodness.
Could this be related to NuGet and Portable Class Libraries - Package doesn't target any framework? that seems more related to making your own NuGet packages for use in your own PCLs.
Unity 3.0.1304.1 does not contain any PCL assemblies so you will not be able to install it into a PCL project using NuGet.
The Unity NuGet package contains assemblies that target the following frameworks:
.NETFramework 4.5
.NETCore 4.5 (Windows Store/WinRT)
Windows Phone 8
You can see these target frameworks if you open the NuGet package into NuGet Package Explorer or download the NuGet package and open it using a program that supports zip files such as 7zip or Windows built-in zip file support.
So your possible options are:
Just use Unity in your main Windows Phone 8 application.
Write your own IOC container.
Use an IOC container that supports PCL projects such as Portable.CommonServiceLocator.
Compile your own PCL version of Unity.
Use a later version of Unity 3.5 since this includes a PCL assembly targeting portable-net45+wp80+win8+MonoAndroid10+MonoTouch10
Updated: 2014-05-11
Unity 3.5 now includes a PCL assembly that targets portable-net45+wp80+win8+MonoAndroid10+MonoTouch10 which will install into a project that targets portable-net45+wp80+win.
There is no Unity for PCL, but you can use Ninject for example.
Prism for Windows phone 8
I have developed an application in C#/XAML for windows 8 using prism .I want to implement the same pattern in my windows phone 8 application also. Which prism library can I use???
A pre-release version is available on NuGet here: http://nuget.org/packages/PortablePrism.WP8/
Microsoft PRISM 4.1 ported to Portable Class Library and
Microsoft.Composition.
Namespaces are not changed for convenience.
To install Portable PRISM - Windows Phone 8, run the following command
in the Package Manager Console
PM> Install-Package PortablePrism.WP8 -Pre
please try this : https://prismwindowsruntime.codeplex.com
The Prism library and AdventureWorks Shopper RI demonstrate how to create Windows Store apps using C# and XAML for Windows 8.1 and Windows Phone 8.1.
I reached out to Blaine Wastell (one of the prism dev team) on Twitter who said that the guys would be looking to start development on this in February or March.
https://twitter.com/blainewastell/status/423927087993331714
I've always used RestSharp to handle async requests on Windows Phone 7 & 7.8 applications, but today, I was trying to add RestSharp to a Windows Phone 8 application and it wouldn't work. This is the error received:
Install-Package: Unable to install the package "RestSharp 104.1". You are attempting to install this package to a will "WindowsPhone, Version = v8.0" as the target of the project, but this package does not contain any compatible with the framework assembly references
I got HTTP requests working by using a Portable HttpClient for .NET Framework and Windows Phone
The last version of it was published on 2/18/2013 and it can be included in the project using the NuGet package manager.
You can find details at the following link:
http://blogs.msdn.com/b/bclteam/archive/2013/02/18/portable-httpclient-for-net-framework-and-windows-phone.aspx
Having installed it
using System.Net.Http;
is now recognized.