LoginSignup
0
1

More than 5 years have passed since last update.

Visual Studio 2013 で NDEF Library for Proximity APIsをデスクトップアプリで使用するための準備

Last updated at Posted at 2015-03-26

前置き

  • デスクトップアプリで、NDEF Library for Proximity APIsを使いたい。
  • Proximity APIはWinRTのAPIであるため、DLLを参照しないと使えない。
  • その方法を見つけたのでまとめた。

手順

1.プロジェクトファイルを変更する。
.vbprojの<Property Group>以下に、<TargetPlatformVerion>8.0</TargetPlatformVerion>を追加する。
2. WinRTに関する参照設定を行う。
[C:\Program Files (x86)\Windows Kits\8.0\References\CommonConfiguration\Neutral\Windows.winmd」を参照に追加
3. WinRTのDLLを参照に追加する。
「C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.dll」
「C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETCore\v4.5\System.Runtime.WindowsRuntime.dll」
「C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.InteropServices.WindowsRuntime.dll」
を参照に追加する。
4. Imports System.Runtime.InteropServices.WindowsRuntime.dll をコードファイルの行頭に追加。

追記

Windows.winmdは8.1でもよい。
.NETFrameworkはv4.5.1でもよい。

参考文献

How to call WinRT APIs from .NET desktop apps
開発者が知っておくべき、ライブラリとしてのWindowsランタイム (2/5)

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1