locked
[WP8.1]C# WinRT component + Microsoft Visual C++ 2013 Runtime Package for Windows Phone Error

    Question

  • Unable to add (Microsoft Visual C++ 2013 Runtime Package for Windows Phone reference) to C# windows runtime component.

    Newly created C# WinRT component project, first step - add reference, build and always got that:

    Error    1    Windows Runtime type 'Windows.Foundation.Point' was found in multiple referenced winmd files. Please remove either 'C:\Program Files (x86)\Microsoft SDKs\WindowsPhoneApp\v8.1\ExtensionSDKs\Microsoft.VCLibs\12.0\References\CommonConfiguration\neutral\platform.winmd' or 'C:\Program Files (x86)\Windows Phone Kits\8.1\References\CommonConfiguration\Neutral\Windows.winmd' from the list of referenced files.   

    I need that reference to use Visual C++ winrt  (.winmd + .dll)

    Any help with that issue?

    Thanks.


    Friday, April 17, 2015 9:25 PM

All replies

  • Hi EnsDevMobile,

    Looks like you should follow the suggestion mentioned in your error message, remove the one of the reference.

    Since you also mentioned you would like to use Visual C++ and WinRT, could you tell me which API you would ref to C++ and which API you want to use by WinRT?

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, April 20, 2015 7:46 AM
    Moderator
  • Hi James,

    Can you explain how I should remove one of the reference?

    Or, to put it another way - I developed my Extension SDK (VC++) for Windows Phone 8.1 that should work with C# applications ( foreground and background ). While reference to my extension coupled with (Microsoft Visual C++ 2013 Runtime Package for Windows Phone reference) works fine for foreground part, I cannot use it the same way for background (C# WinRT component) because of that error.

    How I can solve that?

    Thanks.

    Monday, April 20, 2015 8:37 PM
  • Hi EnsDevMobile,

    I developed my Extension SDK (VC++) for Windows Phone 8.1

    -> Did you follow the guideline provided here: Walkthrough: Creating an SDK using C++? Did you have a mini extension sdk for us to test it?

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, April 21, 2015 9:20 AM
    Moderator
  • Hi James,

    Yes, I followed that guide, though it is far from comprehensive and I had to do additional web search.

    I developed a small app to test that extension. VC++ version of that app (foreground and background)works fine, but when I tried to use C# version of app it got 'System.IO.FileNotFoundException' (assuming) with .dll file.

    Adding reference to (Microsoft Visual C++ 2013 Runtime Package for Windows Phone reference) solved issue for foreground part but not for C# background WinRT component.

    There might be another solution but I was unable to find it.

    I can make a mini extension sdk for your test if you still need it.

    Thanks.

    Tuesday, April 21, 2015 7:54 PM
  • Hi EnsDevMobile,

    Sorry for a late response, and please, share me the extension sdk also your test project for a better analysis.

    I still think the problem might because your referenced dlls are messed up.

    In general there should be any problem of using extension sdk in the project, there are plenty much of Extension SDK written in C++ but no problem while used in C# component.

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, April 27, 2015 1:47 PM
    Moderator
  • Hi James,

    Yes, looks like something wrong with dll reference.

    How I can share those mini test projects with you?

    Thanks,

    Wednesday, April 29, 2015 5:34 PM
  • Via onedrive is suggested :)

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, April 30, 2015 1:51 AM
    Moderator
  • Hi James,

    link to EnSample.SDK.zip solution: http://1drv.ms/1Am9xS7

    it contains:

    1. sample SDK
    2. sample WinRT
    3. C# test app
    4. C# background task
    5. VC++ background task

    Background tasks triggered by SystemTriggerType.TimeZoneChange
    Logs can be found in \Phone\Pictures\enLog

    inside solution everything works fine.
    When switch reference to extension EnSample.SDK  ( C# TestApp & VC++ Background  ) works, but ( C# TestApp & C# Background  ) does not.

    Can you check what I am missing?

    Thanks,

    Thursday, April 30, 2015 7:22 PM
  • Thanks for your sample, I will check it.

    If there is any update, will reply here.

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, May 01, 2015 3:44 AM
    Moderator
  • Hi James,

    Just following up, is there any new information?

    Thanks,

    Friday, May 08, 2015 2:56 PM
  • Hi James,

    any update?

    Friday, May 15, 2015 5:36 PM