This project is read-only.

Windows Phone 8.1 Support

May 29, 2014 at 8:53 PM

I would like to know if you have any plans to support Windows Phone 8.1?
Currently I get the following error:

"'SimpleInjector 2.5.0' already installed.
Adding 'SimpleInjector 2.5.0' to MyApp.WindowsPhone.
Could not install package 'SimpleInjector 2.5.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."

Eduardo Serrano
May 29, 2014 at 9:12 PM
Edited May 29, 2014 at 9:55 PM
Is that the NuGet package you are using? Simple Injector is compatible with WP8 through its PCL package and this should work without problems on newer versions. You can include the SimpleInjector.dll directly in your project. You can extract it from the NuGet package or download it from the Releases tab here on the site.
May 30, 2014 at 10:07 AM
Yes, I'm trying to use the NuGet package. I can add the dll on the project like you said but it would be nice if the NuGet package could be re-targeted to fix this issue.

I believe you can reproduce this issue if you start an universal app project on visual studio and then try to add the Simple Injector package on the Windows Phone project.
May 30, 2014 at 10:17 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
May 30, 2014 at 10:18 AM
Thanks for reporting this. We will try to address this issue for the next release.
May 30, 2014 at 10:19 AM
Thank you for the quick reply. Keep up the good work, Simple Injector is great.

Best Regards,
Eduardo Serrano
Jul 15, 2014 at 8:10 PM
Hi Eduardo,

Do you still have this problem? From what I've read here, the problem seems to be caused by an old version of NuGet and was fixed in NuGet 2.8.1. Can you confirm that this is the case?


Jul 19, 2014 at 12:45 PM
Hi Steven,

Sorry for taking so long to reply, I'm on holidays.

I can not confirm what you have said. On Visual Studio 2013, if I go to "Tools->Extensions and Updates->All->Nuget Package Manager for Visual Studio 2013" it says that the version is 2.8.50313.46 and still I get the error (now with a more recent simple injector version).

"Could not install package 'SimpleInjector 2.5.2'. 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."

Also, the Windows Phone project that I'm trying to add Simple Injector is the one that appeared with the universal app projects. If you go to a portable class library, it will show you 3 types of Windows Phone platforms:
-Windows Phone Silverlight 8
-Windows Phone Silverlight 8.1
-Windows Phone 8.1 (this is the one I'm having issues with)

I just wanted to say this in case you were already targeting the Silverlight 8.1 platform.

Eduardo Serrano
Aug 15, 2014 at 12:49 AM
Hi guys,

Any news about this issue?

Kind Regards,
Eduardo Serrano
Aug 15, 2014 at 9:32 AM
It's still planned to be fixed in version 2.6.
Aug 16, 2014 at 12:03 PM
After some more research, I came to the conclusion that there is no feasible way for us to fix this. The problem is caused by the NuGet Package Manager and there are many developers reporting the same problem with all kind different packages (ranging from open source libraries to NuGet packages published by Microsoft) with the latest version (2.8.5) of the Package Manager. We can only hope that the NuGet team will fix this soon.

There seems to be a workaround though, described here. The workaround simply is to make the project a WP8 project, include the required packages, and upgrade to WP8.1 after that.
Aug 16, 2014 at 12:50 PM
Edited Aug 16, 2014 at 1:32 PM
I have no experience creating nuget packages so I might just be wasting your time but have you seen this link:

I've inspected some nuget packages that work on windows phone 8.1 and although they do not have the mentioned files section on the link

<!-- Support for portable -->
<file src="MyLibrary.dll" target="lib\portable-net45+win8+wp8+wpa81" />

<!-- Windows Phone 8.1 specific library -->
<file src="MyLibrary.Phone.dll" target="lib\wpa81" />

They do have the wpa81 folder name on their nuget lib folder. As the link suggests:
"In case you’re redistributing your library via NuGet, you also need to indicate support for Windows Phone 8.1 by using the new lib folder name, which is wpa81"

Newtonsoft.Json has the following folders: portable-net45+wp80+win8+wpa81 and portable-net40+sl5+wp80+win8+wpa81
Microsoft.Bcl has lots of folders with wpa81 tag : portable-net40+sl4+win8+wp8+wpa81 and portable-net40+sl4+win8+wp71+wpa81 for instance.
Postsharp has one : portable-windows8+net40+sl5+wp8+wpa81
The simple injector lib folder does not have any folder with the wpa81 tag. Am I totally off base here?

Also, I can get a reference to simple injector in the windows phone 8.1 project (or portable class library targeting a windows phone 8.1 project) doing the above mentioned workaround or one that I've found out myself. Which I guess it means the existing dll is already compatible with the windows phone 8.1 platform, its just a case of getting nuget to allow its installation.
Aug 17, 2014 at 4:14 PM
I read a related article that described how to do this, but I might have been mislead by the text. If this is really as easy as adding a new folder than it might be worth changing the NuGet package, although IMO it is still something that NuGet should address, instead of forcing all package owners to change their packages.

I pushed an alpha version of Simple Injector 2.6 where I added the wpa81 folder. Unfortunately my version of Visual Studio has no support for WP8.1., so I can't check it myself. Could you check if this solves the problem?

Aug 17, 2014 at 6:10 PM
Edited Aug 17, 2014 at 6:15 PM

On the windows phone 8.1 project it installs without problems. However on portable class libraries that also target WP8.1 it still doesnt work properly:

1) If I change the targets of the PCL before updating to the alpha version the simple injector nuget gives an error:
"Adding 'SimpleInjector 2.6.0-alpha1' to SoundClouder.Infrastructure.
Could not install package 'SimpleInjector 2.5.2'. You are trying to install this package into a project that targets 'portable-net45+win+wpa81+wp80', 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."

2) If I update to the alpha version first then change the target of the PCL to also include WP8.1 then I get the following error message:
"Some NuGet packages were installed using a target framework different from the current target framework and may need to be reinstalled. Visit for more information. Packages affected: SimpleInjector"

I think its because the way you've packaged it. I've never seen a package that has a folder with only wpa81 in its name. They always have one or more combinations which I think has to do with the PCL combinations they support.

Could you try changing the alpha so that the folder "portable-net4+sl4+wp8+win8" becomes "portable-net4+sl4+wp8+win8+wpa81" ?

Eduardo Serrano
Aug 17, 2014 at 8:42 PM
Can you try again with the alpha2?
Aug 17, 2014 at 9:35 PM

First time I've been able to build my Universal project without doing my workarounds list =)

I've updated all my portable class libraries and my windows phone 8.1 project and everything seems OK!

Thank you very much!

Eduardo Serrano
Aug 17, 2014 at 9:54 PM
Edited Aug 17, 2014 at 9:55 PM
And thank you for testing this. Short note: the alpha you just grabbed is of pretty high quality, so you can use it without having to expect any bugs, but do note that if you start using any new features (which basically is the ILifestyleSelectionBehavior), that this might still change on the RTM of 2.6.
Aug 17, 2014 at 10:04 PM
Will do!

Thank you.
Oct 21, 2014 at 6:52 PM
Just wanted to let you know that last week we published Simple Injector 2.6 RTM to NuGet. So this basically means WP 8.1 support RTM :-)
Marked as answer by dot_NET_Junkie on 11/3/2014 at 1:20 AM
Nov 3, 2014 at 9:17 AM
Thank you for the heads up!

Since the alpha build you've made I've been successfully making use of Simple Injector on my portable class libraries and my windows phone 8.1 project.

Great job guys,
Best Regards