title: Best practice for cross-platform mono project layout when using native dll's
body: <p>I am looking for best practices for a portable C# project that runs on multiple platform. In my case I have different wrapper dll's for each platforms providing interface/classes, etc. Whereas thy are the same on each platform I still need to reference the corresponding dll on each platform. What are best practices in such a case?</p>
  
  <p>I could use conditional references in the C# project file (with the technique described <a href="https://social.msdn.microsoft.com/Forums/en-US/580bbae0-4a31-4a3f-95f3-f61e3edf0809/how-to-add-conditional-references-to-a-project?forum=csharplanguage" rel="nofollow">here</a>). Then I would require to know if I am on Linux, Windows or OS X. How would I do that?</p>
  
  <p>Another option is to create a separate project for each platform. But then I have code redundancy because I have to implement each interface/inheritance for each platform. While the implementation is identical they derive from de facto different types coming from different assemblies (though they are the very same when using them).</p>
  
  <p>What are possible strategies in this case and what are the advantages or downsides?</p>