Does protobuf-csharp-port support Windows RT?
Asked Answered
L

1

1

protobuf-csharp-port homepage(with sourcecode)

In my previous windows phone silverlight 8.0 project
I used protobuf-csharp-port to implement the GPB,
but now I want to port the project to windows 8.1 and then universal,so I copy the source code to create a windows runtime component(I am a library developper),but encounter some problems:enter image description here

sounds like the Serializable Attribute is not useful any more
So question is:

  1. Why the red font?Does protobuf-csharp-port support Windows RT?
  2. If not,How can I use the google protocol buffer on WinRT?

Any Advice would be great,Thanks a lot!!!


Question Update at 2014/07/11
First,thanks for the Nuget Tip,helps me a lot
But some questions still exist
I am a class library developper,my goal now is to develop a portable way for win and wp developpers
So,target win8.1.I choose winrt component at first
after adding reference, winrt component question
so I decide to change,choose class library,I develop my own class library which is referencing "Protocol.Buffers" and add the class library I developped to my demo app,and run the demo app class library question

So,Does protobuf-csharp-port support Windows RT?

Leadbelly answered 10/7, 2014 at 7:13 Comment(0)
C
4

Does protobuf-csharp-port support Windows RT?

Yes, protocol buffers are supported on Windows Store Apps.

How can I use the google protocol buffer on WinRT?

The simplest way is to install the Protocol Buffers NuGet package by Jon Skeet for the relevant projects in your solution:

Protocol Buffers NuGet

This way, all the required references will be properly set up for you, and you can start using it right away.

Christachristabel answered 10/7, 2014 at 7:38 Comment(5)
nice to c u,@aevitas.Following your advice,I just tried to use Nuget to add reference to my win 8.1 project.It indeed add some dlls and some folders in my project,but when I build it,some errors appears:Error 1 Cannot resolve Assembly or Windows Metadata file 'Google.ProtocolBuffers.dll' E:\Code\Lab\AmapWin8v1\AMap_Win8_Api_Demos\MapFrame\AMap_Win8_Api_Demos.csproj AMap_Win8_Api_DemosLeadbelly
Error 2 Type universe cannot resolve assembly: Google.ProtocolBuffers, Version=2.4.1.521, Culture=neutral, PublicKeyToken=55f7125234beb589. AMap_Win8_Api_DemosLeadbelly
could u know why this happensLeadbelly
@IloveIniesta: It's possible that it works with Win8 but not Win8.1. It gets very tricky trying to support lots of different flavours of the PCL, and keep up to date. Could you file an issue on the project web site? I don't personally maintain the Nuget package, but the person who does it pretty responsive. It may be reasonably straightforward to change which PCL profile we're targeting.Indeciduous
@Leadbelly If the answer was satisfactory, would you please consider marking it as such? Thanks.Christachristabel

© 2022 - 2024 — McMap. All rights reserved.