LightInject for windows phone 8.1 - windows-phone-8.1

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)

Related

Chat application using socket.io in windows phone 8.1

"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.

Autofac.Mef and WinRT

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.

Windows Phone 8.1 HubApp + HtmlAgilityPack

I know that using HAP in windows phone apps is very problematic, but I very need to. So the problem is that when I add System.Xml.XPath from silverlight 5 or 4 I get "Xaml Internal Error error WMC9999". It's got to be noticed that the version of HAP is 1.4.6 but not 1.4.9 (tha latest one), because it cannot be installed from NuGet (just doesn't add reference) and I've found no links to download it manually.
In old windows phone 8 silverlight app everything worked great.
Please, help.
Use the HtmlAgilityPack-PCL nuget package with Windows Phone 8.1 XAML apps, it works fine with no need to add any references manually.

Cant use NuGet to add Unity IoC to a portable class library

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.

Error Adding MvvmCross NuGet package to PCL in VS2013

When I try to install MvvmCross on my PCL, I get the error message below. I am running Visual Studio 2013 and the Xamarin Frameworks are installed for the PCLs.
I'm using Profile78, which targets .net framework 4.5, windows store apps (windows 8) and higher, Windows Phone 8, Xamarin.Android, and Xamarin.iOS.
Is there a better profile for me to use?
Could not install package 'MvvmCross.PortableSupport 3.0.13'. You are trying to install this package into a project that targets 'portable-net45+wp80+win+MonoAndroid10+MonoTouch10', 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.
This area is changing with many new releases from many different places. I don't believe there are any definitive answers here today. There's a walkthrough using the latest platforms on http://slodge.blogspot.co.uk/2013/11/quick-run-through-using-pcls-in.html
That walkthrough uses:
Xamarin - iOS 1.8 & Android 4.10
Nuget - 2.7.2
MvvmCross - 3.0.14-beta3
Visual Studio 2012
portable profile 158
Other setups may also work - I don't know if anyone knows which is "better" - but it would be interesting to hear opinions!