<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font color="#000000" face="Calibri,sans-serif">I'm curious: why do you need it to compile with MS.NET if you're testing Mono stuff?<br id="FontBreak"></font><BR>-- Alex<br> <BR><div>> From: edward.harvey.mono@clevertrove.com<br>> To: alex.koeplinger@outlook.com<br>> CC: mono-devel-list@lists.ximian.com<br>> Subject: RE: [Mono-dev] Open source .Net, and TLS 1.1 & 1.2<br>> Date: Sun, 14 Dec 2014 17:44:52 +0000<br>> <br>> > From: Alexander Köplinger [mailto:alex.koeplinger@outlook.com]<br>> > <br>> > You can find out if you run on Mono by checking if Type.GetType<br>> > ("Mono.Runtime") != null.<br>> <br>> That's helpful, but doesn't quite solve it, because compilation will fail on windows ...<br>> <br>> I'm looking for something like this...<br>> <br>> #ifdef MONO<br>>             Mono.Security.X509.X509StoreManager.CurrentUser.TrustedRoot.Import(junkRootCert);<br>>             try<br>>             {<br>> #endif<br>>                 DoStuff();<br>> #ifdef MONO<br>>             }<br>>             finally<br>>             {<br>>                 Mono.Security.X509.X509StoreManager.CurrentUser.TrustedRoot.Remove(junkRootCert);<br>>             }<br>> #endif<br></div>                                          </div></body>
</html>