Re: [Mono-dev] Mono.Posix Cross Compiling

2015-01-07 Thread Greg Young
Sorry the question was already answered above but let me restate the issue. The issue is compiling between ms build and xbuild as the mono.posix reference should only be there in Unix (windows uses win api calls) Above is a good solution (conditional reference) which works. I know we could

Re: [Mono-dev] Mono.Posix Cross Compiling

2015-01-07 Thread Jonathan Pryor
On Jan 5, 2015, at 6:08 PM, Greg Young gregoryyou...@gmail.com wrote: Have anyone used mono.posix or mono.unix.native in a cross compiling scenario where you have to support visual studio builds? How did you handle this? I don't seem to be able to do a platform specific reference. What's the

Re: [Mono-dev] Mono.Posix Cross Compiling

2015-01-06 Thread Edward Ned Harvey (mono)
From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list- boun...@lists.ximian.com] On Behalf Of David Curylo If you edit the .csproj file, you can have a platform-specific reference Mono.Posix like this: Reference Include=Mono.Posix Condition= '$(OS)' != 'Windows_NT' /

Re: [Mono-dev] Mono.Posix Cross Compiling

2015-01-06 Thread David Curylo
You have to use conditional compilation for the code that uses the conditional reference, in this case Mono.Posix. The reference appears with a warning in Visual Studio and you get a compiler warning, “The referenced component ‘Mono.Posix’ could not be found” but this is to be expected on

Re: [Mono-dev] Mono.Posix Cross Compiling

2015-01-06 Thread Greg Young
The reference appears with a warning in Visual Studio and you get a compiler warning, “The referenced component ‘Mono.Posix’ could not be found” but this is to be expected on Windows/.NET. hmm we use warnings as errors will need to try this On Tue, Jan 6, 2015 at 4:54 PM, David Curylo

Re: [Mono-dev] Mono.Posix Cross Compiling

2015-01-06 Thread Rafael Teixeira
Edward, Perhaps using the Message ... task to output the current value to the logging output, by default the console... On Tue, Jan 6, 2015, 18:11 Edward Ned Harvey (mono) edward.harvey.m...@clevertrove.com wrote: From: Dave Curylo [mailto:dacur...@gmail.com] On Behalf Of David Curylo

Re: [Mono-dev] Mono.Posix Cross Compiling

2015-01-06 Thread Edward Ned Harvey (mono)
From: Dave Curylo [mailto:dacur...@gmail.com] On Behalf Of David Curylo You're right.I didn't realize that was what's going on.  It looks like conditional references need some hand holding like this: Choose When Condition= '$(OS)' == 'Unix' ItemGroup Reference

Re: [Mono-dev] Mono.Posix Cross Compiling

2015-01-06 Thread Alexander Köplinger
:) -- Alex From: edward.harvey.m...@clevertrove.com To: alex.koeplin...@outlook.com Subject: RE: [Mono-dev] Mono.Posix Cross Compiling Date: Tue, 6 Jan 2015 19:48:06 + From: Alexander Köplinger [mailto:alex.koeplin...@outlook.com] Why wouldn't the reference with HintPath compile

Re: [Mono-dev] Mono.Posix Cross Compiling

2015-01-06 Thread Alexander Köplinger
versions on Windows. xbuild sets this to “Unix” on non-Windows platforms, even on MacOS. -- Alex From: edward.harvey.m...@clevertrove.com To: cury...@asme.org Date: Tue, 6 Jan 2015 19:57:08 + CC: mono-devel-list@lists.ximian.com Subject: Re: [Mono-dev] Mono.Posix Cross Compiling

Re: [Mono-dev] Mono.Posix Cross Compiling

2015-01-06 Thread David Curylo
On Jan 6, 2015, at 2:57 PM, Edward Ned Harvey (mono) edward.harvey.m...@clevertrove.com wrote: Previously, you had a value 'Windows_NT' and now you have a value 'Unix' in there. How do you figure out what values are valid? I presume there's no such thing as setting a breakpoint inside

Re: [Mono-dev] Mono.Posix Cross Compiling

2015-01-06 Thread Edward Ned Harvey (mono)
From: Dave Curylo [mailto:dacur...@gmail.com] On Behalf Of David Curylo You have to use conditional compilation for the code that uses the conditional reference, in this case Mono.Posix. The reference appears with a warning in Visual Studio and you get a compiler warning, The referenced

Re: [Mono-dev] Mono.Posix Cross Compiling

2015-01-06 Thread David Curylo
On Jan 6, 2015, at 11:12 AM, Edward Ned Harvey (mono) edward.harvey.m...@clevertrove.com wrote: The reason it works is because of the #if __MonoCS__ which eliminates any calls to the missing assembly. You’re right…I didn’t realize that was what’s going on. It looks like conditional

Re: [Mono-dev] Mono.Posix Cross Compiling

2015-01-06 Thread Timotheus Pokorra
Hello, As far as I can tell, any attempt to use Conditional property in the Reference tag is simply ignored. So I settle on using the kludgy hack of using different csproj files on windows mono. It works so I didn't spend more time on it - but if there's a more elegant solution, I'd

[Mono-dev] Mono.Posix Cross Compiling

2015-01-05 Thread Greg Young
Have anyone used mono.posix or mono.unix.native in a cross compiling scenario where you have to support visual studio builds? How did you handle this? I don't seem to be able to do a platform specific reference. I am not using much out of it and it seems like just copy/pasting the extern

Re: [Mono-dev] Mono.Posix Cross Compiling

2015-01-05 Thread David Curylo
Greg, If you edit the .csproj file, you can have a platform-specific reference Mono.Posix like this: Reference Include=Mono.Posix Condition= '$(OS)' != 'Windows_NT' / On Windows with Visual Studio or msbuild, the reference will be ignored. Building under mono with Xamarin Studio,

Re: [Mono-dev] Mono.Posix Cross Compiling

2015-01-05 Thread Greg Young
Ah nice I didn't know you could do that. Thanks! Saves me the trouble of copying bunches of externs :) Greg On Tue, Jan 6, 2015 at 5:01 AM, David Curylo cury...@asme.org wrote: Greg, If you edit the .csproj file, you can have a platform-specific reference Mono.Posix like this: Reference