Many CS1685 warnings while asp.net compilation

malsergeymalsergey Posts: 4
edited November 5, 2012 12:56PM in SQL Comparison SDK Previous Versions
We have a lot (1800) of warnings in compile process of our web application.
For dlls which used by web application it was solved by adding different alias for RedGate libraries. But this workaround is not useful for aspnet_compiler.
Also it is not possible to suppress this warning.

Could you help with it?

Warnings:
(0): warning CS1685: The predefined type 'System.Func' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll'
(0): warning CS1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias; using definition from 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\ec8d7bb0\fdb93028\assembly\dl3\1811f998\c5d5991c_b86fcd01\LinqBridge.DLL'

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    Sorry to say there is no workaround for this issue - We had implemented something to extend Linq and then later Microsoft went and added the same class to .NET Framework.

    However, you should be able to safely ignore the warning - it should not prevent the code from compiling unless "treat warnings as errors" is on. Not sure if that applies to aspnet_compiler but it may do.
  • I had this error in a Redgate-less ASP.NET project, and the workaround was to add the [compilation defaultLanguage="c#"] tag to the web.config file.

    It's worth a try.

    Regards,
    Neil.
Sign In or Register to comment.