locked
Xaml Internal Error referencing Windows.Security.Cryptography.DataProtection

    Question

  • I've created a new Universal Hub app, and in the Shared project I'm making use of Windows.Security.Cryptography.DataProtection.DataProtectionProvider

    The Windows 8 project builds fine, but the Windows Phone app is giving this error:

    1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v12.0\8.1\Microsoft.Windows.UI.Xaml.Common.targets(327,9): Xaml Internal Error error WMC9999: Cannot find type System.Security.Cryptography.AsnEncodedData in module System.dll.

    Is this the right place to ask about this?

    Damian

    Wednesday, April 23, 2014 8:33 PM

Answers

  • User error.  Turns out I had somehow added a reference to System.Security to the WindowsPhone project, which caused this error.  I removed the reference and all builds well now.

    http://about.me/dmehers

    Friday, April 25, 2014 8:00 AM

All replies

  • Hi Damian,

    I think the problem should not be in your DataProtection namespace, it is fully supported by Windows 8 and Windows Phone 8.1.

    However, from your error message, you are using AsnEncodedData Class somewhere, and this is not supported by Windows Store or Windows Phone. A really strange thing is why your Win8 project does not throw any exception.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, April 24, 2014 7:59 AM
    Moderator
  • Hi James,

    I'm making no use of AsnEncodedData - I am just using Windows.Security.Cryptography.DataProtection ... it is a little strange that the error is flagged as an internal error.

    Damian


    http://about.me/dmehers


    Thursday, April 24, 2014 11:51 AM
  • User error.  Turns out I had somehow added a reference to System.Security to the WindowsPhone project, which caused this error.  I removed the reference and all builds well now.

    http://about.me/dmehers

    Friday, April 25, 2014 8:00 AM