Note that there are some explanatory texts on larger screens.

plurals
  1. POThe predefined type 'System.Threading.Tasks.Task' is defined in multiple assemblies in the global alias
    primarykey
    data
    text
    <p>I just have set up a new asp.net mvc 4 project, using the latest .net framework (4.5) in combination with Visual studio 2012. After I added some classes, side projects etc. I suddently notice that I'm receiving 5 times the same warning when I compile the project. The warning states:</p> <blockquote> <p>ASPNETCOMPILER : warning CS1685: The predefined type 'System.Threading.Tasks.Task' is defined in multiple assemblies in the global alias; using definition from 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\mscorlib.dll'</p> </blockquote> <p>So now I'm wondering in which assemblies are this type defined than? All my projects in the solution are using version 4.5 of the .net framework, so 4.5\mscorlib.dll should be the only one or am I missing something?</p> <p>My solutions consists of 4 projects ( 3 class libraries, and 1 mvc-4 web project). The 3 class libraries don't show any warnings when I compile them indepently. It's only the web project which throws the warnings, but the class library projects are referenced by the web project. The references of the web project:</p> <ul> <li>Antlr3.Runtime</li> <li>Microsoft.CSharp</li> <li>Microsoft.Web.Infrastructure</li> <li>System</li> <li>System.Data</li> <li>System.Web.DynamicData</li> <li>System.Web.Entity</li> <li>System.Web.ApplicationServices</li> <li>System.ComponentModel.DataAnnotations</li> <li>System.Core</li> <li>System.Data.DataSetExtensions</li> <li>System.Web.Optimization</li> <li>System.Xml.Linq</li> <li>System.Web</li> <li>System.Web.Extensions</li> <li>System.Web.Abstractions</li> <li>System.Web.Routing</li> <li>System.Xml</li> <li>System.Configuration</li> <li>System.Web.Services</li> <li>System.EnterpriseServices</li> <li>Newtonsoft.Json</li> <li>System.Net.Http </li> <li>System.Net.Http.Formatting</li> <li>System.Net.Http.WebRequest</li> <li>System.Web.Helpers</li> <li>System.Web.Http</li> <li>System.Web.Http.WebHost</li> <li>System.Web.Mvc</li> <li>System.Web.Razor</li> <li>System.Web.WebPages</li> <li>System.Web.WebPages.Deploymen</li> <li>System.Web.WebPages.Razor</li> <li>WebGrease</li> </ul> <p>Does anyone have a suggestion where to look?</p> <p>Thanks in advance</p> <p>BHD</p> <p><strong>UPDATE</strong> It seems that more people have similar issues like this, in my case the answer was: We are using here some company libraries, which were indeed using older versions of the framework (3.5) and caused the warnings.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload