leejw51 / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
0 stars 0 forks source link

.NET CF Problems #113

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have a .NET CF 3.5 project in which I would like to use protobuf-net.  I'm 
getting the following complie problems that I'm hoping someone can help with.  
I tried referencing System.Xml and System.Xml.XmlSerialization but I was still 
getting the errors.  These errors are occurring on both v1 and v2 (from trunk). 
 These errors DO NOT occur after I remove protobuf-net.  Any help is greatly 
appreciated.

Warning 1   Reference to type 'System.Runtime.Serialization.IFormatter' claims it 
is defined in 'c:\Program 
Files\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\mscorlib.dll', but it 
could not be found

Warning 2   Reference to type 'System.Runtime.Serialization.SerializationInfo' 
claims it is defined in 'c:\Program 
Files\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\mscorlib.dll', but it 
could not be found

Error   3   The type 'System.Xml.Serialization.IXmlSerializable' is defined in an 
assembly that is not referenced. You must add a reference to assembly 
'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

Error   4   The type 'System.Xml.XmlWriter' is defined in an assembly that is not 
referenced. You must add a reference to assembly 'System.Xml, Version=2.0.0.0, 
Culture=neutral, PublicKeyToken=b77a5c561934e089'.

My Code (v2):

            string path = Path.GetTempFileName();
            Serializer.PrepareSerializer<Message>();
            using (Stream file = File.Create(path))
            {
                Serializer.Serialize(file, sortedMessages);
                file.Close();
            }   

Original issue reported on code.google.com by umair.chagani on 9 Jun 2010 at 5:32

GoogleCodeExporter commented 9 years ago
Hi. There is a specific build for compact framework. For "v1", this is the CF20 
or CF35 zips (depending on the CF version). The "v2" build process is 
incomplete, but "build_cf20.bat" is probably a good starting point.

I can't guarantee that the "v2" trunk builds cleanly for all platforms at the 
moment - that is work in progress. But if you get problems, let me know.

Original comment by marc.gravell on 9 Jun 2010 at 6:52

GoogleCodeExporter commented 9 years ago
I'm getting a lot of errors when I run that batch file.  Please see attached 
file.  Thanks again for your help!

Original comment by umair.chagani on 10 Jun 2010 at 8:58

Attachments:

GoogleCodeExporter commented 9 years ago
OK; I've recently switch workstations, and it looks like VS2010 hates the 
earlier CF versions; I'm setting up a VM to investigate this and get the build 
cleaned.

Original comment by marc.gravell on 11 Jun 2010 at 1:02

GoogleCodeExporter commented 9 years ago
Sorry to restart this thread. I wonder if it is the right place to ask, but I 
am having the same issues with the latest (r358) build. 
I was hoping to be able to try the alpha of v2 for cf35, but I cannot get it to 
compile with the batch file and have the same problems with the default 
project. Are there any protobuf-net.dll snapshots from v2 available to 
download? or is there a revision for v2 when it was known to build cleanly for 
cf35 that I can try?

Original comment by eacue...@gmail.com on 1 Dec 2010 at 11:09

GoogleCodeExporter commented 9 years ago
Hello, i downloaded the latest v2 build, 2.0.0.668 and it gives me the exact 
same errors for a project on CF 3.5. What am i doing wrong or what must be done 
to get rid of these errors ? Thank you in advance

Original comment by paunasu...@gmail.com on 7 Oct 2014 at 12:43