4
votes

I work on a project target WP 7.5 and above, I add a packages using the Nuget in VS 2012 which name is Coding4fun(Controls).

After that, the IDE give me a warning,

Warning 1 The predefined type 'System.Tuple' is defined in multiple assemblies in the global alias; using definition from 'c:\Users\Gao\Documents\Visual Studio 2012\Projects\TFSGit\xicihutong\packages\Coding4Fun.Toolkit.Controls.2.0.5\lib\wp71\Coding4Fun.Toolkit.Controls.dll' C:\Users\Gao\Documents\Visual Studio 2012\Projects\TFSGit\xicihutong\xicihutong\CSC xicihutong

The app runs OK, but how to solve this warning?

2

2 Answers

8
votes

From Compiler Warning (level 1) CS1685

This error occurs when a predefined system type such as System.Tuple is found in two assemblies. One way this can happen is if you are referencing mscorlib from two different places, such as trying to run the.Net Framework versions 1.0 and 1.1 side-by-side.

The compiler will use the definition from only one of the assemblies.

This problem occurs probably System.Tuple is defined in two different assemblies. Probably your Coding4Fun.Toolkit.Controls.dll has too besides mscorlib.dll.

If you want to look them both you can check them;

But how to solve this warning?

You can define your 3rd party assemblies reference some aliases. You can follow in your project

Reference -> Properties -> Aliases ->

And change "global" to something different.

Check out for information extern alias (C# Reference)

1
votes

Newer version of c4f toolkit has resolved this issue.