点击按钮拨打电话
Make call by click on Button
我正在为 Windows Phone 10
编写应用程序
我试着按这样的按钮来拨打 phone 电话
Windows.ApplicationModel.Calls.PhoneCallManager.ShowPhoneCallUI("phone number", "display name");
但是有这个错误:
Error CS1069 The type name 'PhoneCallManager' could not be found in
the namespace 'Windows.ApplicationModel.Calls'. This type has been
forwarded to assembly 'Windows.Foundation.UniversalApiContract,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=null,
ContentType=WindowsRuntime' Consider adding a reference to that
assembly.
我该如何解决这个问题?
错误指出您正在使用不同的命名空间 (Windows.ApplicationModel.Calls
)。答案在错误中。建议您包含一个不同的程序集,意思是 Windows.Foundation.UniversalApiContract
编辑:如前所述here,我建议您检查要求,您可能遗漏了什么。
我也遇到了这个错误并找到了解决方案 :
You have to include Windows Mobile Extensions for the UWP. Just add a new reference and go into Univerval Windows/Extensions.
我正在为 Windows Phone 10
编写应用程序我试着按这样的按钮来拨打 phone 电话
Windows.ApplicationModel.Calls.PhoneCallManager.ShowPhoneCallUI("phone number", "display name");
但是有这个错误:
Error CS1069 The type name 'PhoneCallManager' could not be found in the namespace 'Windows.ApplicationModel.Calls'. This type has been forwarded to assembly 'Windows.Foundation.UniversalApiContract, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime' Consider adding a reference to that assembly.
我该如何解决这个问题?
错误指出您正在使用不同的命名空间 (Windows.ApplicationModel.Calls
)。答案在错误中。建议您包含一个不同的程序集,意思是 Windows.Foundation.UniversalApiContract
编辑:如前所述here,我建议您检查要求,您可能遗漏了什么。
我也遇到了这个错误并找到了解决方案
You have to include Windows Mobile Extensions for the UWP. Just add a new reference and go into Univerval Windows/Extensions.