You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Marius Greve Hagen <ma...@gmail.com> on 2010/10/22 13:07:03 UTC

Thrift for Windows Phone 7

How do I compile the thrift .dll to use in a Windows Phone 7 application?
Compiling the .dll with standard Visual Studio Express 2010 works just  
fine, but when I try to add it as a reference to my Windows Phone project  
I get an error message saying that it wasn't built with the Windows Phone  
runtime.
When I then try to build it in Visual Studio 2010 Express for Windows  
Phone I get some errors that BufferedStream, TcpClient and some others  
can't be found. I.e. they are not in the .NET CF that the Windows Phone  
SDK uses...
Any way to solve this? :)

- Marius

Re: Thrift for Windows Phone 7

Posted by Seth Hitchings <se...@evernote.com>.
If you're looking for Silverlight bindings for the Evernote EDAM API, get in
touch with me and I can share a beta with you. We described the work that we
did here:
http://damianblog.com/2011/01/11/generating-silverlight-windows-phone-compatible-thrift-proxies/

Seth

On Tue, Mar 8, 2011 at 5:56 AM, Jebin <je...@systalent.com> wrote:

> Good post. Exactly what I was looking for. Did you completely port the
> whole
> thrif project to WP7. Can you please post the whole project here, I mean
> only
> the thrif project and EDAM project. Thanks in advance.
>
> Jebin
>
>
>
>

Re: Thrift for Windows Phone 7

Posted by Jebin <je...@systalent.com>.
Good post. Exactly what I was looking for. Did you completely port the whole
thrif project to WP7. Can you please post the whole project here, I mean only
the thrif project and EDAM project. Thanks in advance.

Jebin




Re: Thrift for Windows Phone 7

Posted by Rob Fulwell <gm...@fulwell.com>.
Marius Greve Hagen <marius.greve.hagen <at> gmail.com> writes:

> 
> I finaly got it to work, so I will take a look at the HowToContribute link  
> when I've got the time for it :)
> 
> Marius

I've just spent a few minutes porting the Thrift code to compile for Windows
Phone 7 and this is what I have so far:
1) Removed all [Serializable] attributes.
2) Removed the TSocket.cs and TServerSocket.cs files from the project*.
3) Edited the THashSet class like this:
	public class THashSet<T> : ICollection<T>
	{
#if NET_2_0
		TDictSet<T> set = new TDictSet<T>();
#else
#if WINDOWS_PHONE
        List<T> set = new List<T>();
#else
		HashSet<T> set = new HashSet<T>();
#endif
#endif

Now, I'm working on the THttpClient.cs usage of HttpWebRequest which has a
different API on the Windows Phone 7 (they do everything asynchronously).  I
think the best thing to do is implement timeouts in my own HttpWebRequest
sub-class and translate the synchronous connection.GetRequestStream() and
connection.GetResponse() to the asynchronous Windows Phone 7 versions.  This
will take a bit longer.

In that same section of code, the Windows Phone 7 version of HttpWebRequest does
not implement support for the .Proxy member but that is just set to null in the
existing code.

Likewise, the data.Length can just be passed directly to the Stream.Write() call
since the Windows Phone 7 version of HttpWebRequest also lacks a .ContentLength
member.

I haven't yet figured out what I'm going to do about the lack of a
BufferedStream implementation in Windows Phone 7.  This is used in
TBufferedTransport.cs but I don't know how critical it is.

*I'm actually using links to the regular Thrift files so this just means that I
removed the links for those two files.

We'll see if I can knock the rest of this out later today.

Rob.



Re: Thrift for Windows Phone 7

Posted by ro...@bufferoverflow.ch.
YEAH! Congratulations!

- Roger

Quoting Marius Greve Hagen <ma...@gmail.com>:

> I finaly got it to work, so I will take a look at the  
> HowToContribute link when I've got the time for it :)
>
> Marius
>
> På Mon, 25 Oct 2010 21:23:18 +0200, skrev <ro...@bufferoverflow.ch>:
>
>> Sorry, I do not have a Windows 7 or Vista Environment, which seems  
>> to be required for Windows 7 Phone Development.
>>
>> But try to remove or re-implement functionality by using a Compiler Switch
>>
>> e.g. within lib/csharp/src/Collections/THashSet.cs
>>
>> #if NET_2_0
>> 		TDictSet<T> set = new TDictSet<T>();
>> #else
>> 		HashSet<T> set = new HashSet<T>();
>> #endif
>>
>> what implementation does Windows Phone 7 provide?
>>
>> then have a look at http://wiki.apache.org/thrift/HowToContribute
>>
>> we are ready to add new functionality or new platforms.
>>
>> - Roger
>>
>>
>> Quoting Marius Greve Hagen <ma...@gmail.com>:
>>
>>> Anyone?
>>>
>>> På Sat, 23 Oct 2010 01:02:02 +0200, skrev Marius Greve Hagen  
>>> <ma...@gmail.com>:
>>>
>>>> No? How do I use that?
>>>>
>>>> When I compile lib/csharp/src/Thrift.csproj using .NET Framework  
>>>> 4 I get no errors, but when I compile it with the Windows Phone  
>>>> framework I get errors that the type or namespace  
>>>> "BufferedStream", "HashSet", "TcpClient" and so on could not be  
>>>> found.
>>>> When I try to add the .dll created with .NET F4 in my Windows  
>>>> Phone project I get an error that it was not built using the  
>>>> Windows Phone runtime so I cannot use it.
>>>>
>>>> Any suggestions on how I should proceed to get this working?
>>>>
>>>> Marius
>>>>
>>>> På Fri, 22 Oct 2010 23:19:33 +0200, skrev <ro...@bufferoverflow.ch>:
>>>>
>>>>> have you seen lib/csharp/ThriftMSBuildTask/ThriftMSBuildTask.csproj ?
>>>>>
>>>>> what error messages do you have during compile?
>>>>>
>>>>> Quoting Marius Greve Hagen <ma...@gmail.com>:
>>>>>
>>>>>> But how do I build a .dll that uses that client in Visual  
>>>>>> Studio 2010 Express for Windows Phone?
>>>>>>
>>>>>> - Marius
>>>>>>
>>>>>> På Fri, 22 Oct 2010 15:12:24 +0200, skrev <ro...@bufferoverflow.ch>:
>>>>>>
>>>>>>> HTTP client is available, see:
>>>>>>> lib/csharp/src/Transport/THttpClient.cs
>>>>>>>
>>>>>>> - Roger
>>>>>>>
>>>>>>> Quoting Marius Greve Hagen <ma...@gmail.com>:
>>>>>>>
>>>>>>>> I really hope it's been ported to C#.
>>>>>>>> If not, you think it's much work to port it myself? It  
>>>>>>>> doesn't affect the server side right?
>>>>>>>>
>>>>>>>> - Marius
>>>>>>>>
>>>>>>>> På Fri, 22 Oct 2010 13:24:15 +0200, skrev Michael Walsh  
>>>>>>>> <mi...@michael.ie>:
>>>>>>>>
>>>>>>>>> WP7 uses a modified Silverlight profile, not the .NET CF profile.
>>>>>>>>>
>>>>>>>>> This means that just like silverlight apps, you do not have  
>>>>>>>>> ANY socket access at all so the TcpClient doesn't exist.
>>>>>>>>>
>>>>>>>>> There are 2 methods for connectivity. One is a silverlight  
>>>>>>>>> specific way that talks to a predefined set of ports.
>>>>>>>>>
>>>>>>>>> The other is to use HTTP only.
>>>>>>>>>
>>>>>>>>> There have been adaptions of Thrift to be wrapped over HTTP,  
>>>>>>>>> but I can't remember if they were ported to C#.
>>>>>>>>>
>>>>>>>>> Michael
>>>>>>>>>
>>>>>>>>> Sent from my iPhone
>>>>>>>>>
>>>>>>>>> On 22 Oct 2010, at 12:07, "Marius Greve Hagen"  
>>>>>>>>> <marius.greve.hagen@gmail.com > wrote:
>>>>>>>>>
>>>>>>>>>> How do I compile the thrift .dll to use in a Windows Phone  
>>>>>>>>>> 7 application?
>>>>>>>>>> Compiling the .dll with standard Visual Studio Express 2010  
>>>>>>>>>> works just fine, but when I try to add it as a reference to  
>>>>>>>>>> my Windows Phone project I get an error message saying that  
>>>>>>>>>> it wasn't built with the Windows Phone runtime.
>>>>>>>>>> When I then try to build it in Visual Studio 2010 Express  
>>>>>>>>>> for Windows Phone I get some errors that BufferedStream,  
>>>>>>>>>> TcpClient and some others can't be found. I.e. they are not  
>>>>>>>>>> in the .NET CF that the Windows Phone SDK uses...
>>>>>>>>>> Any way to solve this? :)
>>>>>>>>>>
>>>>>>>>>> - Marius
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ----------------------------------------------------------------
>>>>>>> This message was sent using IMP, the Internet Messaging Program.
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ----------------------------------------------------------------
>>>>> This message was sent using IMP, the Internet Messaging Program.
>>>
>>>
>>>
>>
>>
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>
>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Re: Thrift for Windows Phone 7

Posted by Marius Greve Hagen <ma...@gmail.com>.
I finaly got it to work, so I will take a look at the HowToContribute link  
when I've got the time for it :)

Marius

På Mon, 25 Oct 2010 21:23:18 +0200, skrev <ro...@bufferoverflow.ch>:

> Sorry, I do not have a Windows 7 or Vista Environment, which seems to be  
> required for Windows 7 Phone Development.
>
> But try to remove or re-implement functionality by using a Compiler  
> Switch
>
> e.g. within lib/csharp/src/Collections/THashSet.cs
>
> #if NET_2_0
> 		TDictSet<T> set = new TDictSet<T>();
> #else
> 		HashSet<T> set = new HashSet<T>();
> #endif
>
> what implementation does Windows Phone 7 provide?
>
> then have a look at http://wiki.apache.org/thrift/HowToContribute
>
> we are ready to add new functionality or new platforms.
>
> - Roger
>
>
> Quoting Marius Greve Hagen <ma...@gmail.com>:
>
>> Anyone?
>>
>> På Sat, 23 Oct 2010 01:02:02 +0200, skrev Marius Greve Hagen  
>> <ma...@gmail.com>:
>>
>>> No? How do I use that?
>>>
>>> When I compile lib/csharp/src/Thrift.csproj using .NET Framework 4 I  
>>> get no errors, but when I compile it with the Windows Phone framework  
>>> I get errors that the type or namespace "BufferedStream", "HashSet",  
>>> "TcpClient" and so on could not be found.
>>> When I try to add the .dll created with .NET F4 in my Windows Phone  
>>> project I get an error that it was not built using the Windows Phone  
>>> runtime so I cannot use it.
>>>
>>> Any suggestions on how I should proceed to get this working?
>>>
>>> Marius
>>>
>>> På Fri, 22 Oct 2010 23:19:33 +0200, skrev <ro...@bufferoverflow.ch>:
>>>
>>>> have you seen lib/csharp/ThriftMSBuildTask/ThriftMSBuildTask.csproj ?
>>>>
>>>> what error messages do you have during compile?
>>>>
>>>> Quoting Marius Greve Hagen <ma...@gmail.com>:
>>>>
>>>>> But how do I build a .dll that uses that client in Visual Studio  
>>>>> 2010 Express for Windows Phone?
>>>>>
>>>>> - Marius
>>>>>
>>>>> På Fri, 22 Oct 2010 15:12:24 +0200, skrev <ro...@bufferoverflow.ch>:
>>>>>
>>>>>> HTTP client is available, see:
>>>>>> lib/csharp/src/Transport/THttpClient.cs
>>>>>>
>>>>>> - Roger
>>>>>>
>>>>>> Quoting Marius Greve Hagen <ma...@gmail.com>:
>>>>>>
>>>>>>> I really hope it's been ported to C#.
>>>>>>> If not, you think it's much work to port it myself? It doesn't  
>>>>>>> affect the server side right?
>>>>>>>
>>>>>>> - Marius
>>>>>>>
>>>>>>> På Fri, 22 Oct 2010 13:24:15 +0200, skrev Michael Walsh  
>>>>>>> <mi...@michael.ie>:
>>>>>>>
>>>>>>>> WP7 uses a modified Silverlight profile, not the .NET CF profile.
>>>>>>>>
>>>>>>>> This means that just like silverlight apps, you do not have ANY  
>>>>>>>> socket access at all so the TcpClient doesn't exist.
>>>>>>>>
>>>>>>>> There are 2 methods for connectivity. One is a silverlight  
>>>>>>>> specific way that talks to a predefined set of ports.
>>>>>>>>
>>>>>>>> The other is to use HTTP only.
>>>>>>>>
>>>>>>>> There have been adaptions of Thrift to be wrapped over HTTP, but  
>>>>>>>> I can't remember if they were ported to C#.
>>>>>>>>
>>>>>>>> Michael
>>>>>>>>
>>>>>>>> Sent from my iPhone
>>>>>>>>
>>>>>>>> On 22 Oct 2010, at 12:07, "Marius Greve Hagen"  
>>>>>>>> <marius.greve.hagen@gmail.com > wrote:
>>>>>>>>
>>>>>>>>> How do I compile the thrift .dll to use in a Windows Phone 7  
>>>>>>>>> application?
>>>>>>>>> Compiling the .dll with standard Visual Studio Express 2010  
>>>>>>>>> works just fine, but when I try to add it as a reference to my  
>>>>>>>>> Windows Phone project I get an error message saying that it  
>>>>>>>>> wasn't built with the Windows Phone runtime.
>>>>>>>>> When I then try to build it in Visual Studio 2010 Express for  
>>>>>>>>> Windows Phone I get some errors that BufferedStream, TcpClient  
>>>>>>>>> and some others can't be found. I.e. they are not in the .NET CF  
>>>>>>>>> that the Windows Phone SDK uses...
>>>>>>>>> Any way to solve this? :)
>>>>>>>>>
>>>>>>>>> - Marius
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ----------------------------------------------------------------
>>>>>> This message was sent using IMP, the Internet Messaging Program.
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> ----------------------------------------------------------------
>>>> This message was sent using IMP, the Internet Messaging Program.
>>
>>
>>
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.

Re: Thrift for Windows Phone 7

Posted by ro...@bufferoverflow.ch.
Sorry, I do not have a Windows 7 or Vista Environment, which seems to  
be required for Windows 7 Phone Development.

But try to remove or re-implement functionality by using a Compiler Switch

e.g. within lib/csharp/src/Collections/THashSet.cs

#if NET_2_0
		TDictSet<T> set = new TDictSet<T>();
#else
		HashSet<T> set = new HashSet<T>();
#endif

what implementation does Windows Phone 7 provide?

then have a look at http://wiki.apache.org/thrift/HowToContribute

we are ready to add new functionality or new platforms.

- Roger


Quoting Marius Greve Hagen <ma...@gmail.com>:

> Anyone?
>
> På Sat, 23 Oct 2010 01:02:02 +0200, skrev Marius Greve Hagen  
> <ma...@gmail.com>:
>
>> No? How do I use that?
>>
>> When I compile lib/csharp/src/Thrift.csproj using .NET Framework 4  
>> I get no errors, but when I compile it with the Windows Phone  
>> framework I get errors that the type or namespace "BufferedStream",  
>> "HashSet", "TcpClient" and so on could not be found.
>> When I try to add the .dll created with .NET F4 in my Windows Phone  
>> project I get an error that it was not built using the Windows  
>> Phone runtime so I cannot use it.
>>
>> Any suggestions on how I should proceed to get this working?
>>
>> Marius
>>
>> På Fri, 22 Oct 2010 23:19:33 +0200, skrev <ro...@bufferoverflow.ch>:
>>
>>> have you seen lib/csharp/ThriftMSBuildTask/ThriftMSBuildTask.csproj ?
>>>
>>> what error messages do you have during compile?
>>>
>>> Quoting Marius Greve Hagen <ma...@gmail.com>:
>>>
>>>> But how do I build a .dll that uses that client in Visual Studio  
>>>> 2010 Express for Windows Phone?
>>>>
>>>> - Marius
>>>>
>>>> På Fri, 22 Oct 2010 15:12:24 +0200, skrev <ro...@bufferoverflow.ch>:
>>>>
>>>>> HTTP client is available, see:
>>>>> lib/csharp/src/Transport/THttpClient.cs
>>>>>
>>>>> - Roger
>>>>>
>>>>> Quoting Marius Greve Hagen <ma...@gmail.com>:
>>>>>
>>>>>> I really hope it's been ported to C#.
>>>>>> If not, you think it's much work to port it myself? It doesn't  
>>>>>> affect the server side right?
>>>>>>
>>>>>> - Marius
>>>>>>
>>>>>> På Fri, 22 Oct 2010 13:24:15 +0200, skrev Michael Walsh  
>>>>>> <mi...@michael.ie>:
>>>>>>
>>>>>>> WP7 uses a modified Silverlight profile, not the .NET CF profile.
>>>>>>>
>>>>>>> This means that just like silverlight apps, you do not have  
>>>>>>> ANY socket access at all so the TcpClient doesn't exist.
>>>>>>>
>>>>>>> There are 2 methods for connectivity. One is a silverlight  
>>>>>>> specific way that talks to a predefined set of ports.
>>>>>>>
>>>>>>> The other is to use HTTP only.
>>>>>>>
>>>>>>> There have been adaptions of Thrift to be wrapped over HTTP,  
>>>>>>> but I can't remember if they were ported to C#.
>>>>>>>
>>>>>>> Michael
>>>>>>>
>>>>>>> Sent from my iPhone
>>>>>>>
>>>>>>> On 22 Oct 2010, at 12:07, "Marius Greve Hagen"  
>>>>>>> <marius.greve.hagen@gmail.com > wrote:
>>>>>>>
>>>>>>>> How do I compile the thrift .dll to use in a Windows Phone 7  
>>>>>>>> application?
>>>>>>>> Compiling the .dll with standard Visual Studio Express 2010  
>>>>>>>> works just fine, but when I try to add it as a reference to  
>>>>>>>> my Windows Phone project I get an error message saying that  
>>>>>>>> it wasn't built with the Windows Phone runtime.
>>>>>>>> When I then try to build it in Visual Studio 2010 Express for  
>>>>>>>> Windows Phone I get some errors that BufferedStream,  
>>>>>>>> TcpClient and some others can't be found. I.e. they are not  
>>>>>>>> in the .NET CF that the Windows Phone SDK uses...
>>>>>>>> Any way to solve this? :)
>>>>>>>>
>>>>>>>> - Marius
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ----------------------------------------------------------------
>>>>> This message was sent using IMP, the Internet Messaging Program.
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> ----------------------------------------------------------------
>>> This message was sent using IMP, the Internet Messaging Program.
>
>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Re: Thrift for Windows Phone 7

Posted by Marius Greve Hagen <ma...@gmail.com>.
Anyone?

På Sat, 23 Oct 2010 01:02:02 +0200, skrev Marius Greve Hagen  
<ma...@gmail.com>:

> No? How do I use that?
>
> When I compile lib/csharp/src/Thrift.csproj using .NET Framework 4 I get  
> no errors, but when I compile it with the Windows Phone framework I get  
> errors that the type or namespace "BufferedStream", "HashSet",  
> "TcpClient" and so on could not be found.
> When I try to add the .dll created with .NET F4 in my Windows Phone  
> project I get an error that it was not built using the Windows Phone  
> runtime so I cannot use it.
>
> Any suggestions on how I should proceed to get this working?
>
> Marius
>
> På Fri, 22 Oct 2010 23:19:33 +0200, skrev <ro...@bufferoverflow.ch>:
>
>> have you seen lib/csharp/ThriftMSBuildTask/ThriftMSBuildTask.csproj ?
>>
>> what error messages do you have during compile?
>>
>> Quoting Marius Greve Hagen <ma...@gmail.com>:
>>
>>> But how do I build a .dll that uses that client in Visual Studio 2010  
>>> Express for Windows Phone?
>>>
>>> - Marius
>>>
>>> På Fri, 22 Oct 2010 15:12:24 +0200, skrev <ro...@bufferoverflow.ch>:
>>>
>>>> HTTP client is available, see:
>>>> lib/csharp/src/Transport/THttpClient.cs
>>>>
>>>> - Roger
>>>>
>>>> Quoting Marius Greve Hagen <ma...@gmail.com>:
>>>>
>>>>> I really hope it's been ported to C#.
>>>>> If not, you think it's much work to port it myself? It doesn't  
>>>>> affect the server side right?
>>>>>
>>>>> - Marius
>>>>>
>>>>> På Fri, 22 Oct 2010 13:24:15 +0200, skrev Michael Walsh  
>>>>> <mi...@michael.ie>:
>>>>>
>>>>>> WP7 uses a modified Silverlight profile, not the .NET CF profile.
>>>>>>
>>>>>> This means that just like silverlight apps, you do not have ANY  
>>>>>> socket access at all so the TcpClient doesn't exist.
>>>>>>
>>>>>> There are 2 methods for connectivity. One is a silverlight specific  
>>>>>> way that talks to a predefined set of ports.
>>>>>>
>>>>>> The other is to use HTTP only.
>>>>>>
>>>>>> There have been adaptions of Thrift to be wrapped over HTTP, but I  
>>>>>> can't remember if they were ported to C#.
>>>>>>
>>>>>> Michael
>>>>>>
>>>>>> Sent from my iPhone
>>>>>>
>>>>>> On 22 Oct 2010, at 12:07, "Marius Greve Hagen"  
>>>>>> <marius.greve.hagen@gmail.com > wrote:
>>>>>>
>>>>>>> How do I compile the thrift .dll to use in a Windows Phone 7  
>>>>>>> application?
>>>>>>> Compiling the .dll with standard Visual Studio Express 2010 works  
>>>>>>> just fine, but when I try to add it as a reference to my Windows  
>>>>>>> Phone project I get an error message saying that it wasn't built  
>>>>>>> with the Windows Phone runtime.
>>>>>>> When I then try to build it in Visual Studio 2010 Express for  
>>>>>>> Windows Phone I get some errors that BufferedStream, TcpClient and  
>>>>>>> some others can't be found. I.e. they are not in the .NET CF that  
>>>>>>> the Windows Phone SDK uses...
>>>>>>> Any way to solve this? :)
>>>>>>>
>>>>>>> - Marius
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> ----------------------------------------------------------------
>>>> This message was sent using IMP, the Internet Messaging Program.
>>>
>>>
>>>
>>
>>
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.

Re: Thrift for Windows Phone 7

Posted by Marius Greve Hagen <ma...@gmail.com>.
No? How do I use that?

When I compile lib/csharp/src/Thrift.csproj using .NET Framework 4 I get  
no errors, but when I compile it with the Windows Phone framework I get  
errors that the type or namespace "BufferedStream", "HashSet", "TcpClient"  
and so on could not be found.
When I try to add the .dll created with .NET F4 in my Windows Phone  
project I get an error that it was not built using the Windows Phone  
runtime so I cannot use it.

Any suggestions on how I should proceed to get this working?

Marius

På Fri, 22 Oct 2010 23:19:33 +0200, skrev <ro...@bufferoverflow.ch>:

> have you seen lib/csharp/ThriftMSBuildTask/ThriftMSBuildTask.csproj ?
>
> what error messages do you have during compile?
>
> Quoting Marius Greve Hagen <ma...@gmail.com>:
>
>> But how do I build a .dll that uses that client in Visual Studio 2010  
>> Express for Windows Phone?
>>
>> - Marius
>>
>> På Fri, 22 Oct 2010 15:12:24 +0200, skrev <ro...@bufferoverflow.ch>:
>>
>>> HTTP client is available, see:
>>> lib/csharp/src/Transport/THttpClient.cs
>>>
>>> - Roger
>>>
>>> Quoting Marius Greve Hagen <ma...@gmail.com>:
>>>
>>>> I really hope it's been ported to C#.
>>>> If not, you think it's much work to port it myself? It doesn't affect  
>>>> the server side right?
>>>>
>>>> - Marius
>>>>
>>>> På Fri, 22 Oct 2010 13:24:15 +0200, skrev Michael Walsh  
>>>> <mi...@michael.ie>:
>>>>
>>>>> WP7 uses a modified Silverlight profile, not the .NET CF profile.
>>>>>
>>>>> This means that just like silverlight apps, you do not have ANY  
>>>>> socket access at all so the TcpClient doesn't exist.
>>>>>
>>>>> There are 2 methods for connectivity. One is a silverlight specific  
>>>>> way that talks to a predefined set of ports.
>>>>>
>>>>> The other is to use HTTP only.
>>>>>
>>>>> There have been adaptions of Thrift to be wrapped over HTTP, but I  
>>>>> can't remember if they were ported to C#.
>>>>>
>>>>> Michael
>>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>> On 22 Oct 2010, at 12:07, "Marius Greve Hagen"  
>>>>> <marius.greve.hagen@gmail.com > wrote:
>>>>>
>>>>>> How do I compile the thrift .dll to use in a Windows Phone 7  
>>>>>> application?
>>>>>> Compiling the .dll with standard Visual Studio Express 2010 works  
>>>>>> just fine, but when I try to add it as a reference to my Windows  
>>>>>> Phone project I get an error message saying that it wasn't built  
>>>>>> with the Windows Phone runtime.
>>>>>> When I then try to build it in Visual Studio 2010 Express for  
>>>>>> Windows Phone I get some errors that BufferedStream, TcpClient and  
>>>>>> some others can't be found. I.e. they are not in the .NET CF that  
>>>>>> the Windows Phone SDK uses...
>>>>>> Any way to solve this? :)
>>>>>>
>>>>>> - Marius
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> ----------------------------------------------------------------
>>> This message was sent using IMP, the Internet Messaging Program.
>>
>>
>>
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.

Re: Thrift for Windows Phone 7

Posted by ro...@bufferoverflow.ch.
have you seen lib/csharp/ThriftMSBuildTask/ThriftMSBuildTask.csproj ?

what error messages do you have during compile?

Quoting Marius Greve Hagen <ma...@gmail.com>:

> But how do I build a .dll that uses that client in Visual Studio  
> 2010 Express for Windows Phone?
>
> - Marius
>
> På Fri, 22 Oct 2010 15:12:24 +0200, skrev <ro...@bufferoverflow.ch>:
>
>> HTTP client is available, see:
>> lib/csharp/src/Transport/THttpClient.cs
>>
>> - Roger
>>
>> Quoting Marius Greve Hagen <ma...@gmail.com>:
>>
>>> I really hope it's been ported to C#.
>>> If not, you think it's much work to port it myself? It doesn't  
>>> affect the server side right?
>>>
>>> - Marius
>>>
>>> På Fri, 22 Oct 2010 13:24:15 +0200, skrev Michael Walsh  
>>> <mi...@michael.ie>:
>>>
>>>> WP7 uses a modified Silverlight profile, not the .NET CF profile.
>>>>
>>>> This means that just like silverlight apps, you do not have ANY  
>>>> socket access at all so the TcpClient doesn't exist.
>>>>
>>>> There are 2 methods for connectivity. One is a silverlight  
>>>> specific way that talks to a predefined set of ports.
>>>>
>>>> The other is to use HTTP only.
>>>>
>>>> There have been adaptions of Thrift to be wrapped over HTTP, but  
>>>> I can't remember if they were ported to C#.
>>>>
>>>> Michael
>>>>
>>>> Sent from my iPhone
>>>>
>>>> On 22 Oct 2010, at 12:07, "Marius Greve Hagen"  
>>>> <marius.greve.hagen@gmail.com > wrote:
>>>>
>>>>> How do I compile the thrift .dll to use in a Windows Phone 7 application?
>>>>> Compiling the .dll with standard Visual Studio Express 2010  
>>>>> works just fine, but when I try to add it as a reference to my  
>>>>> Windows Phone project I get an error message saying that it  
>>>>> wasn't built with the Windows Phone runtime.
>>>>> When I then try to build it in Visual Studio 2010 Express for  
>>>>> Windows Phone I get some errors that BufferedStream, TcpClient  
>>>>> and some others can't be found. I.e. they are not in the .NET CF  
>>>>> that the Windows Phone SDK uses...
>>>>> Any way to solve this? :)
>>>>>
>>>>> - Marius
>>>
>>>
>>>
>>
>>
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>
>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Re: Thrift for Windows Phone 7

Posted by Marius Greve Hagen <ma...@gmail.com>.
But how do I build a .dll that uses that client in Visual Studio 2010  
Express for Windows Phone?

- Marius

På Fri, 22 Oct 2010 15:12:24 +0200, skrev <ro...@bufferoverflow.ch>:

> HTTP client is available, see:
> lib/csharp/src/Transport/THttpClient.cs
>
> - Roger
>
> Quoting Marius Greve Hagen <ma...@gmail.com>:
>
>> I really hope it's been ported to C#.
>> If not, you think it's much work to port it myself? It doesn't affect  
>> the server side right?
>>
>> - Marius
>>
>> På Fri, 22 Oct 2010 13:24:15 +0200, skrev Michael Walsh  
>> <mi...@michael.ie>:
>>
>>> WP7 uses a modified Silverlight profile, not the .NET CF profile.
>>>
>>> This means that just like silverlight apps, you do not have ANY socket  
>>> access at all so the TcpClient doesn't exist.
>>>
>>> There are 2 methods for connectivity. One is a silverlight specific  
>>> way that talks to a predefined set of ports.
>>>
>>> The other is to use HTTP only.
>>>
>>> There have been adaptions of Thrift to be wrapped over HTTP, but I  
>>> can't remember if they were ported to C#.
>>>
>>> Michael
>>>
>>> Sent from my iPhone
>>>
>>> On 22 Oct 2010, at 12:07, "Marius Greve Hagen"  
>>> <marius.greve.hagen@gmail.com > wrote:
>>>
>>>> How do I compile the thrift .dll to use in a Windows Phone 7  
>>>> application?
>>>> Compiling the .dll with standard Visual Studio Express 2010 works  
>>>> just fine, but when I try to add it as a reference to my Windows  
>>>> Phone project I get an error message saying that it wasn't built with  
>>>> the Windows Phone runtime.
>>>> When I then try to build it in Visual Studio 2010 Express for Windows  
>>>> Phone I get some errors that BufferedStream, TcpClient and some  
>>>> others can't be found. I.e. they are not in the .NET CF that the  
>>>> Windows Phone SDK uses...
>>>> Any way to solve this? :)
>>>>
>>>> - Marius
>>
>>
>>
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.

Re: Thrift for Windows Phone 7

Posted by ro...@bufferoverflow.ch.
HTTP client is available, see:
lib/csharp/src/Transport/THttpClient.cs

- Roger

Quoting Marius Greve Hagen <ma...@gmail.com>:

> I really hope it's been ported to C#.
> If not, you think it's much work to port it myself? It doesn't  
> affect the server side right?
>
> - Marius
>
> På Fri, 22 Oct 2010 13:24:15 +0200, skrev Michael Walsh <mi...@michael.ie>:
>
>> WP7 uses a modified Silverlight profile, not the .NET CF profile.
>>
>> This means that just like silverlight apps, you do not have ANY  
>> socket access at all so the TcpClient doesn't exist.
>>
>> There are 2 methods for connectivity. One is a silverlight specific  
>> way that talks to a predefined set of ports.
>>
>> The other is to use HTTP only.
>>
>> There have been adaptions of Thrift to be wrapped over HTTP, but I  
>> can't remember if they were ported to C#.
>>
>> Michael
>>
>> Sent from my iPhone
>>
>> On 22 Oct 2010, at 12:07, "Marius Greve Hagen"  
>> <marius.greve.hagen@gmail.com > wrote:
>>
>>> How do I compile the thrift .dll to use in a Windows Phone 7 application?
>>> Compiling the .dll with standard Visual Studio Express 2010 works  
>>> just fine, but when I try to add it as a reference to my Windows  
>>> Phone project I get an error message saying that it wasn't built  
>>> with the Windows Phone runtime.
>>> When I then try to build it in Visual Studio 2010 Express for  
>>> Windows Phone I get some errors that BufferedStream, TcpClient and  
>>> some others can't be found. I.e. they are not in the .NET CF that  
>>> the Windows Phone SDK uses...
>>> Any way to solve this? :)
>>>
>>> - Marius
>
>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Re: Thrift for Windows Phone 7

Posted by Marius Greve Hagen <ma...@gmail.com>.
I really hope it's been ported to C#.
If not, you think it's much work to port it myself? It doesn't affect the  
server side right?

- Marius

På Fri, 22 Oct 2010 13:24:15 +0200, skrev Michael Walsh  
<mi...@michael.ie>:

> WP7 uses a modified Silverlight profile, not the .NET CF profile.
>
> This means that just like silverlight apps, you do not have ANY socket  
> access at all so the TcpClient doesn't exist.
>
> There are 2 methods for connectivity. One is a silverlight specific way  
> that talks to a predefined set of ports.
>
> The other is to use HTTP only.
>
> There have been adaptions of Thrift to be wrapped over HTTP, but I can't  
> remember if they were ported to C#.
>
> Michael
>
> Sent from my iPhone
>
> On 22 Oct 2010, at 12:07, "Marius Greve Hagen"  
> <marius.greve.hagen@gmail.com > wrote:
>
>> How do I compile the thrift .dll to use in a Windows Phone 7  
>> application?
>> Compiling the .dll with standard Visual Studio Express 2010 works just  
>> fine, but when I try to add it as a reference to my Windows Phone  
>> project I get an error message saying that it wasn't built with the  
>> Windows Phone runtime.
>> When I then try to build it in Visual Studio 2010 Express for Windows  
>> Phone I get some errors that BufferedStream, TcpClient and some others  
>> can't be found. I.e. they are not in the .NET CF that the Windows Phone  
>> SDK uses...
>> Any way to solve this? :)
>>
>> - Marius

Re: Thrift for Windows Phone 7

Posted by Michael Walsh <mi...@michael.ie>.
WP7 uses a modified Silverlight profile, not the .NET CF profile.

This means that just like silverlight apps, you do not have ANY socket  
access at all so the TcpClient doesn't exist.

There are 2 methods for connectivity. One is a silverlight specific  
way that talks to a predefined set of ports.

The other is to use HTTP only.

There have been adaptions of Thrift to be wrapped over HTTP, but I  
can't remember if they were ported to C#.

Michael

Sent from my iPhone

On 22 Oct 2010, at 12:07, "Marius Greve Hagen" <marius.greve.hagen@gmail.com 
 > wrote:

> How do I compile the thrift .dll to use in a Windows Phone 7  
> application?
> Compiling the .dll with standard Visual Studio Express 2010 works  
> just fine, but when I try to add it as a reference to my Windows  
> Phone project I get an error message saying that it wasn't built  
> with the Windows Phone runtime.
> When I then try to build it in Visual Studio 2010 Express for  
> Windows Phone I get some errors that BufferedStream, TcpClient and  
> some others can't be found. I.e. they are not in the .NET CF that  
> the Windows Phone SDK uses...
> Any way to solve this? :)
>
> - Marius