Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nuget error installing protobuf-net on portable library

I'm trying to install protobuf-net (2.0.0.602) in a portable class library, I just can't seem to get this to work. I get this error:

PM> install-package protobuf-net
'protobuf-net 2.0.0.602' already installed.
install-package : Could not install package 'protobuf-net 2.0.0.602'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.0,Profile=Profile4', 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.

Inspecting the package it appears to target portable-sl4+wp71+windows8, however when i create a vinalla project targeting these frameworks I can't get it to work (profile4 is listed above, but I've tried a few different ones to see what sticks). I've just updated nuget in studio. Running 'nuget' from the package manager console shows the nuget version as 2.1.31022.9038.

If I browse to the protobuf-net.dll within the package (under lib\portable-sl4+wp71+windows8) it will allow me to reference it and all is good.

I can just manually add it, but am I missing something obvious.

Any help appreciated.

like image 774
Keith Avatar asked Oct 06 '22 18:10

Keith


1 Answers

This appears to be just a slight tweak needed to the nuget config; I had specified portable-sl4+wp71+windows8, when actually I needed to specify portable-sl4+net4+wp7+windows8, to include regular .NET.

This is fixed in 2.0.0.611, which has been pushed to NuGet.

like image 140
Marc Gravell Avatar answered Oct 10 '22 02:10

Marc Gravell