Brilliant, the use of ";lightFramework" works wonders!

To do this automatically can the custom tool find out the CLR it's being
compiled against from the csproj and add the appropriate flags accordingly?

Many thanks for your help,
Andrew

On 6 January 2011 20:50, Marc Gravell <[email protected]> wrote:

> I've dug out the syntax; in the namespace box, you *can* enter a regular
> namespace, and that will be used for the *generated codes* namespace,
> however **after** this you can also add a semi-colon delimited list of
> arguments to pass to the transform - so in the case of Silverlight:
> ";lightFramework" should do the job - this will be translated to
> "-p:lightFramework"
>
> Let me know how that goes.
>
> And that **really** isn't obvious - I must make that clearer. Unfortunately
> VS doesn't give me many ways of passing options to "custom tools".
>
> Marc
>
>
> On 6 January 2011 15:12, Andrew Slater <[email protected]> wrote:
>
>> Ah, indeed there is a command line option for the compiler, it's
>> -p:lightFramework for anyone else following this.
>>
>> However I have been using the IDE to generate the .protos so it would be
>> good to know the namespace trick, can't quite work that one out.
>>
>> Cheers
>>
>>
>> On 5 January 2011 18:05, Marc Gravell <[email protected]> wrote:
>>
>>> Are you using the IDE or command-line to handle the .proto? There is a
>>> switch for this - I'm not at a PC at the moment, but try "protogen /?"
>>>
>>> I'll be at a PC in a few hours; I should be able to give a more complete
>>> answer then. If using the IDE there is a trick here involving the
>>> "namespace" property (against the file is VS).
>>>
>>> Let me know which is more appropriate ;)
>>>
>>>
>>>
>>> Marc
>>>
>>> On 5 Jan 2011, at 11:52, Aslate <[email protected]> wrote:
>>>
>>> > Hi guys,
>>> >
>>> > I've been using Protobuf-net successfully in a .NET project and it's
>>> > been working great. We then decided to create a Silverlight frontend
>>> > and found that our generated C# (from .proto) files won't compile
>>> > against Silverlight.
>>> >
>>> > The problem comes from the fact that System.Serializable does not
>>> > exist in the CF, but this is because MS have made it optional within
>>> > Silverlight. I found that replacing this with
>>> > System.Runtime.Serialization.DataContract seemed to work perfectly
>>> > fine.
>>> >
>>> > Is there any way of getting this change (or something similar) back
>>> > into Protobuf-net?
>>> >
>>> > Cheers,
>>> > Andrew
>>>
>>
>>
>>
>> --
>> Andrew Slater
>> Webmaster - The Fry Hole
>> http://www.thefryhole.co.uk
>>
>
>
>
> --
> Regards,
>
> Marc
>



-- 
Andrew Slater
Webmaster - The Fry Hole
http://www.thefryhole.co.uk

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to