C# - The type or namespace name 'Security' does not exist in the namespace 'Windows' (are you missing an assembly reference?)

久未见 提交于 2019-12-01 14:27:14

The Reference you need to the Windows namespace is not visual by default. Per Alex's answer at the below post:

In the desktop projects the Core tab doesn’t appear by default. You can add the Windows Runtime by opening the shortcut menu for the project node, choosing Unload Project, adding the following snippet, and re-opening the project (on the project node choose Reload Project). When you invoke the Reference Manager dialog box, the Core tab appears.

<PropertyGroup>
    <TargetPlatformVersion>8.0</TargetPlatformVersion>
</PropertyGroup>

Make sure to check the Windows box on this tab. You should then be able to use WinRT elements.

I have done this and your code statement above compiles without error. Here is a link to the original answer:

How to access the stored credentials (Password Value?)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!