Tuesday, February 16, 2010

Error when compiling: The type 'xxxx.xx' is ambiguous: it could come from...



If you are getting the next error:
Error 2
The type 'xxxxxx.xxxxx' is ambiguous: it could come from assembly 'c:\WINDOWS\Microsoft.NET\Framework\ v2.0.50727\Temporary ASP.NET Files\MyAPP\5a8a9753\38142b3b\App_SubCode_XXXX.dxin6yoo.DLL' or from assembly 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\MyAPP\5a8a9753\38142b3b\App_Code.9tr7twyo.DLL'. Please specify the assembly explicitly in the type name.

This problem is because you are trying to move from on version to another of .NET, or you have projects with compilation issues.

You can try the next options to solve the problem:
  1. Delete the files inside of the \bin directory
  2. Delete the files inside of the Temporary ASP.NET Files in the next path: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\MyApplication
  3. Be sure you have the next tags on your config file:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>

<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>




No comments:

Post a Comment