none
Microsoft.Phone.dll is missing RRS feed

  • Question

  • I'm building my first Windows Phone app that needs :

    Windows.Phone.Tasks references

    I wrote the line to import the above reference, however an error appeared:

    (The error)

    Namespace or type specified in the imports 'Windows.Phone.Tasks' doesn't contain any public memver or cann't be found.

    and suggested to use another reference instead which is:

    Imports System.Threading.Tasks

     After I used the reference above and tried to run the application for the first time, two errors appeared:

    Error 1 Cannot resolve Assembly or Windows Metadata file 'Microsoft.Phone.dll' c:\users\***\documents\visual studio 2013\Projects\****\****\****.vbproj *****

    Error 2 Type universe cannot resolve assembly: Microsoft.Phone, Version=7.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e. Raseedy
    What's the solution?

    Regards,


    Sunday, July 27, 2014 11:37 AM

Answers

  • I think you might be using a windows phone 8.1 (winrt) project instead of the windows phone 8.1 silverlight version.  I think you would need to make the call like this instead.  Can you confirm what version windows phone is your project targeting?

    Windows.ApplicationModel.Calls.PhoneCallManager.ShowPhoneCallUI(PhoneNumber, DisplayName)

    Sunday, July 27, 2014 2:04 PM
  • I've added the dll file of Microsoft.Phone as a reference.

    Don't do that. It isn't necessary and may cause problems depending on which version you linked.


    I opened a new Visual Basic Blank Windows Phone Project (8.1, not Silverlight), added the line of code in Ken's post, and it worked perfectly with no additional steps.

    In MainPage.xaml.vb:

        Protected Overrides Sub OnNavigatedTo(e As Navigation.NavigationEventArgs)
            Windows.ApplicationModel.Calls.PhoneCallManager.ShowPhoneCallUI("4258828080", "Microsoft")
        End Sub

    Your issues are unrelated to code for making a phone call. Do what I did and check that it works for you.

    I think you've been looking at examples for Silverlight and trying to apply them to the Runtime environment. You'll need to undo some of the things you've done and learn how to do it in Runtime. Post your code here if you still have problems.

    Monday, July 28, 2014 6:13 AM

All replies

  • If you created a universal app the tasks are different than in the silverlight app.  What task are you trying to use?
    Sunday, July 27, 2014 12:40 PM
  • Hi,

    Thank you for your reply.

    I'm using Visual Basic Blank Windows Phone Project. What I'm trying to do is a phone call button that will call numbers from variables to make a phone call.

    After searching in the internet I found that I need to use Windows.Phone.Task reference for this purpose.

    This the code that I used:

    Dim phoneCallTask As PhoneCallTask = New PhoneCallTask()
            
            phoneCallTask.PhoneNumber = var_finalR
            phoneCallTask.DisplayName = "Contact Name"
    
            phoneCallTask.Show()


    am I in the right road? Or there is something else that I need to use instead?

    Regards,  

    Sunday, July 27, 2014 1:41 PM
  • I think you might be using a windows phone 8.1 (winrt) project instead of the windows phone 8.1 silverlight version.  I think you would need to make the call like this instead.  Can you confirm what version windows phone is your project targeting?

    Windows.ApplicationModel.Calls.PhoneCallManager.ShowPhoneCallUI(PhoneNumber, DisplayName)

    Sunday, July 27, 2014 2:04 PM
  • Hi,


    I'm targeting windows phone 8.1 (not windows phone Silverlight project).

    I've used your line of code, but it gave me the same error.

    Those are the references that I used:

    Imports Raseedy.Common
    Imports System.Threading.Tasks

     

    Regards,



    Sunday, July 27, 2014 4:23 PM
  • I've added the dll file of Microsoft.Phone as a reference. However, I have another issue:

    Error 1 Cannot find type System.Windows.Controls.ContentControl in module System.Windows.dll. 

    What does it mean?

    Regards,

     
    Monday, July 28, 2014 1:45 AM
  • I've added the dll file of Microsoft.Phone as a reference.

    Don't do that. It isn't necessary and may cause problems depending on which version you linked.


    I opened a new Visual Basic Blank Windows Phone Project (8.1, not Silverlight), added the line of code in Ken's post, and it worked perfectly with no additional steps.

    In MainPage.xaml.vb:

        Protected Overrides Sub OnNavigatedTo(e As Navigation.NavigationEventArgs)
            Windows.ApplicationModel.Calls.PhoneCallManager.ShowPhoneCallUI("4258828080", "Microsoft")
        End Sub

    Your issues are unrelated to code for making a phone call. Do what I did and check that it works for you.

    I think you've been looking at examples for Silverlight and trying to apply them to the Runtime environment. You'll need to undo some of the things you've done and learn how to do it in Runtime. Post your code here if you still have problems.

    Monday, July 28, 2014 6:13 AM
  • Thank you very much Sir.

    It's working as I wanted exactly.

    Now I'm moving forward to save settings using isolated storage. I found the link bellow, but it's for a Silverlight project.

    msdn.microsoft.com/en-us/library/cc221360(v=vs.95).aspx

    As I understood, what's in the link is not applicable for my project, is it?

    Regards,
    Monday, July 28, 2014 1:51 PM
  • Windows Runtime has a different API for local storage. You can use LocalSettings:

    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh700361.aspx

    Monday, July 28, 2014 4:06 PM
  • Thank you very much for your help.

    I'm still working to let it store values permanently using methods in the link that you posted.

    I have another issue that may let me stop working in this project.

    What I'm trying to do is to let the user to use service code that starts with *. for example: *123*12345*1345#

    There is an error:
    please enter the service code directly from the phone's keypad

    Does this mean that what I want to do is not possible? Or there is way to do it?

    Regards,
    Monday, July 28, 2014 5:21 PM
  • I am not knowledgeable in this area. Please open a new thread because it is a different topic.
    Monday, July 28, 2014 5:53 PM