Porting Application from Windows 7 to Windows 8 RRS feed

  • Question

  • I have created a application for Windows Phone 7, it is working well in the devices. Now I planned to Port/Upgrade it to the new Windows Phone 8.

    I followed the process mentioned in the following link


    Though I followed the process, I am having only one Warning which I couldn't resolve it. And the Warning is

    "The predefined type 'System.Tuple' is defined in multiple assemblies in the global alias; using definition from 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsPhone\v8.0\mscorlib.dll "

    Can anyone tell me how to resolve this Warning ?

    Wednesday, November 28, 2012 11:12 AM

All replies

  • @SRM - the resolution of the issue you mentioned has been convered in the link itself. Below is the section that talks about it -

    After upgrade, building your app project fails with an error about duplicate types or ambiguous types

    Issue. An existing project uses an API from an assembly in a Microsoft SDK such as the Windows Phone Toolkit. In Windows Phone 8, the API has been moved into a different namespace in the Windows Phone 8 reference assemblies. As a result, the compiler can’t choose between the definition in the SDK assembly and the definition in the reference assembly.

    Example. The System.Tuple type was defined in the Windows Phone Toolkit for Windows Phone OS 7.1. In Windows Phone OS 8.0, the System.Tuple class has been moved to mscorlib.dll. If your upgraded project still has a reference to the Windows Phone Toolkit for Windows Phone OS 7.1, along with the default reference to mscorlib.dll, you may see an error about duplicate or ambiguous types.

    Symptoms. You may see a warning similar to the following.

    The predefined type 'System.Tuple' is defined in multiple assemblies in the global alias; using definition from 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsPhone\v8.0\mscorlib.dll'

    Resolution. Manually update your code to point to the correct namespace for the type in the Windows Phone 8 reference assembly. Or, if the type definition has been moved to a newer version of the same SDK assembly, manually remove the reference to the older version and add a reference to the newer version of the SDK assembly.

    Wednesday, November 28, 2012 12:41 PM
  • As I have mentioned before , I have went through the contents but I am not able to find out the exact reason. I can understand that the reference we are using in different places. The following are the namespaces I am using in my application,

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Net;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Animation;
    using System.Windows.Shapes;
    using Microsoft.Phone.Controls;

    using Microsoft.SilverlightMediaFramework.Core.Media;
    using Microsoft.Phone.Net.NetworkInformation;
    using Microsoft.SilverlightMediaFramework.Core;

    Can you tell me which one is replicating another namespace ?

    Wednesday, November 28, 2012 1:55 PM
  • @SRM Tec - are you using Silverlight Toolkit in your application. Can you try removing it and installing the latest version through NuGet?

    Do take a backup of your project :)

    Thursday, November 29, 2012 2:41 AM
  • We have uninstalled the Silverlight Toolkit and again installed using the following link


    Still we are having the same warning. The following are the references we are using in our application

    Still we are getting the The predefined type 'System.Tuple' is defined in multiple assemblies in the global alias; warning.

    Thursday, November 29, 2012 6:20 AM
  • @SRM Tec - I tried the same reference list in a new project at my end and the warning is not seen at my end. I have got latest version of WP Toolkit (v4.2012.10.30) and latest version of MMP Player Framework 2.7 (Silverlight and WP7) installed from http://smf.codeplex.com/releases/view/88970

    Can you try installing the latest version(2.7) of MMP Player Framework as well.

    Additionally you can search for "System.Tuple" in the Object Browser and find out which two dlls are having it. One will be mscorlib.

    Thursday, November 29, 2012 7:26 AM
  • I have searched System.Tuple in Object Browser, and I am able to see that all the items are listed twice like Tuple<T1,T2> , Tuple <T1,T2>

    If I search for Definition, one is pointing to mscorlib[] and the other is pointing to mscorlib[]. Whether these multiple mscorb results this warning ?

    Thursday, November 29, 2012 9:10 AM
  • @SRM Tec - I just checked, Microsoft.SilverlightMediaFramework.Compatibility.Phone also contains System.Tuple. You need to log a bug for MMP Player Framework 2.7 (Silverlight and WP7) at http://smf.codeplex.com/workitem/list/advanced

    Thursday, November 29, 2012 1:00 PM