[Mono-dev] Mono.Posix Cross Compiling

David Curylo curylod at asme.org
Tue Jan 6 17:34:52 UTC 2015


On Jan 6, 2015, at 11:12 AM, Edward Ned Harvey (mono) <edward.harvey.mono at 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 references need some hand holding like this:

  <Choose>
    <When Condition=" '$(OS)' == 'Unix' ">
      <ItemGroup>
        <Reference Include="Mono.Posix" />
      </ItemGroup>
    </When>
  </Choose>
I updated the sample on GitHub.  Builds on either, references work as you would expect on the different platforms without compiler warnings, but you don’t see them in the IDE since neither IDE supports these conditions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20150106/e33ac623/attachment-0001.html>


More information about the Mono-devel-list mailing list