Why do I need a recompiled page when a method used by it changes?
I have an aspx page that used a method in a class in the App Code folder, doSomething(int[] x). I changed the function definition to use an IEnumerable instead of an array: doSomething(IEnumerable<int> x). Next, I precompiled the web site, using “allow web site to be updatable”, and published the new App_Code.dll. Now, the precompiled version of the page gives a Server error at runtime: “Method not found”.
If I also publish the DLL generated for the page, “App_Web_[page].aspx.[random].dll”, it works. So it appears the signature of the function is embedded in the compiled page somehow…? Why is this, and is there a way to avoid this problem when changing existing code?
I’d hate updating all my page DLLs whenever I change code in my common classes.