Skip to content

Instantly share code, notes, and snippets.

@20chan
Created November 29, 2019 02:48
Show Gist options
  • Save 20chan/3351db644ef9f5f6c0a38382d583e93d to your computer and use it in GitHub Desktop.
Save 20chan/3351db644ef9f5f6c0a38382d583e93d to your computer and use it in GitHub Desktop.
Use RadialController (and other UWP apis) in winform

UWP in Winform

원래 TargetPlatform을 8 이상으로 하고 Windows SDK가 깔려잇다면 VS 참조 탭에서 왼쪽에 Windows SDK가 뜨고 거기에 dll들이 뜨나보다 근데 Windows SDK만 뜨고 안에 없다고 뜸 SDK도 설치되어있는데

그래서 찾아보니까 https://developercommunity.visualstudio.com/content/problem/608833/no-references-were-found-in-the-windows-sdk.html 이게 윈도우 1903 버그라고 심지어 한 스택오버플로우 질답 에서는 윈도우를 1803으로 다운그레이드하세요! 라는 답변이 채택되었다

적당히 상식적인 해결방법은 직접 레퍼런스를 참조하는 것 %windir%\Sysnative\WinMetadata 디렉터리의 winmd파일을 직접 임포트하고 귀찮게 하면 되는데 그렇게 해도 내가 원하는 Windows.UI.Input.RadialController는 안나오더라고

그래서 더 찾아봤다 공식문서에서도 거의 위와 비슷하게 Windows Kit에서 임포트하세요 하는데 거기에도 없었음

찾은 솔루션은 윈도우 블로그 였음

저 경로 포맷이 다 깨져서 알아볼 수 없게 된 글로 어떻게든 찾은 두 winmd, dll 파일 임포트하니까 그제서야 RadialController을 포함한 UWP api들을 쓸 수 있었다 Windows-classic-samples 리포에서 본 프로젝트도 다 깨지고 실행도 안되는 판에 겨우 찾은 해결법임

1903 버그는 해결할 생각조차 없나봄 ㅉ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment