title: .NET Core 2.0 RSA PlatformNotSupportedException
body: <p>I am trying to use this code to generate a public and private key, I am using .NET Core 2 on Windows 10</p>
  
  <p>So far I had no success in running this code, it compiles just fine but when I get to the rsa.ToXmlString line it drops with a PlatformNotSupportedException and as I read in another answer on stack overflow the solution was using <code>System.Security.Cryptography.Algorithms</code> and they showed the almost exact code that I use here down below.</p>
  
  <pre><code>        using (RSA rsa = RSA.Create())
          {
              rsa.KeySize = 1024;
  
              privateKey = rsa.ToXmlString(true);
              publicKey = rsa.ToXmlString(false);
          }
  </code></pre>
  
  <p>Error:
  <a href="https://i.stack.imgur.com/X6TqW.png" rel="noreferrer"><img src="https://i.stack.imgur.com/X6TqW.png" alt="enter image description here"></a></p>
  
  <p>As seen here it does show up in their API browser, so it has to be supported, right?
  <a href="https://i.stack.imgur.com/VL6bK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/VL6bK.png" alt="enter image description here"></a></p>
  
  <p>Does anyone have any similar problems? Or does anyone have a fix for this?
  I have to use .NET Core so don't suggest using .NET 4.6</p>