getting CS1502 compiler error on dev environment but not production.

Posted by nw on Stack Overflow See other posts from Stack Overflow or by nw
Published on 2010-04-29T23:04:34Z Indexed on 2010/04/29 23:07 UTC
Read the original article Hit count: 266

Filed under:
|

When I try to run my ASP.NET app from my development environment I get the following error message: Compiler Error Message: CS1502: The best overloaded method match for 'mmars.Printing.printFunctions.SetPrintSummaryProperties(mmars.contextInfo, ref mmars.Printing.printObjSummary)' has some invalid arguments.

When I publish and run on our production server I don't get this error.

It seems to compile fine when I build from the build menu (in fact if I change the second argument of the bolded function call below, i get a compiler error in visual studio), but now i've suddenly started getting this error message at runtime. So another question I have in addition to getting rid of the error is why is the .NET development server even trying to do JIT compilation on my project if it is already compiled into a DLL?

Printing.printObjSummary myPrintObj = new Printing.printObjSummary(); Printing.printFunctions.SetPrintSummaryProperties(ci, ref myPrintObj); printObjects.Add(myPrintObj);

This seems to have just suddenly appeared from nowhere today and it's extremely frustrating.

Also, though there are no warnings at compile-time, when I get redirected to the page with that first compilation error there are many warnings like the following:

Warning: CS0436: The type 'mmars.MMARSSummaryDataItem' in 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3dad423c\40569048\App_Code.b0rgpkzr.4.cs' conflicts with the imported type 'mmars.MMARSSummaryDataItem' in 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3dad423c\40569048\assembly\dl3\7179c19a\345f948c_ece7ca01\mmars.DLL'. Using the type defined in 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\3dad423c\40569048\App_Code.b0rgpkzr.4.cs'.

What's the deal with that? Is the webserver complaining about name conflicts in the source file and dll resulting from the source file?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about c#