I’ve been using Delphi Prism for years (I know, I know, it is old and I have the newer version), but I have to fix a customer problem and I can’t get it to run my Silverlight web site anymore.
I opened up the solution and tried to run it. Instead of being pre-compiled (I’ve specified pre-compiled not updateable), the browser takes a little while like it is compiling the aspx and code and then gives this error and never shows loading the xap:
Server Error in '/GuardianScheduler' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: PE223: (PE223) "System.Collections.Generic.List<Guardian.Scheduler.DataContracts.ScheduledJob>" does not contain a definition for "OrderByDescending" in expression "Jobs.OrderByDescending"
Source Error:
Line 112:
Line 113: result := new List<ScheduledJob>( from job in Jobs
Line 114: order by job.NextScheduled desc
Line 115: select job );
Line 116: end;
Source File: C:\Users\mtiede\Documents\Visual Studio 2010\Projects\SW\GuardianScheduler\GuardianScheduler.Web\App_Code\Database\ReportParts\ScheduledJob.pas Line: 114
I’ve tried cleaning the whole solution, rebuilding, but didn’t help. I’ve tried turning the “updateable” option ON, compiling and then turning it back OFF again, but nothing is helping.
At this point, I can’t work on the customer’s problem and even if I fixed the code, I’m not sure I can get it to a state where it is precompiled again to distribute that to the customer.
Anyone got an idea what happened here?
… time passes …
This system consists of several VS Solutions. I successfully opened one of the other solutions and it compiles and runs just fine. There seems to be something messed up in THIS one solution that causes me not to be able to run it in the debugger because it thinks it should be compiled on the server.
… time passes …
The one that works ok has an App_Code folder that is empty. The one that doesn’t work has an App_Code folder that has stuff in it. Maybe that makes a difference. But nothing has changed with the solution since it was compiled and ran last time. So not sure why that might make a difference. Also not sure why they are different between the two solutions.
It has been a long time since I compared them, but I suspect that they originally BOTH had stuff in the App_Code folder, but one of them was refactored to move all that stuff out to another project.
So my guess is that this folder has nothing to do with what is going on.
… time passes …
If I PUBLISH it, it runs okay. So the only problem is running it in the debugger. I suppose I can make code changes, publish, test, and then repeat that process till I figure out what is going on in the code. I suppose I could even attach the debugger to the running process.
Still seems odd that it is trying to compile server side code when running in debugger.