Problem: I want to deploy modified code into web server. web server is having IIS version set to V2.0. and now I have developed and published code on my local machine with version 4.0. (there is App_code.dll as part of all dll files).
Now whenever I am deploying all files along with App_code.dll I am getting following error:" Could not load file or assembly 'App_Code' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded"
1) My question is how do I build App_code.dll in older version. 2) I tried changing target framework to V2.0 while publishing but then its not working because AJAX functions from other dll are not compiling..
can anyone please suggest what to do to run the site..
Help is appreciated.
Thanks

Sorry about the answers I've given... But try this...
Try adding
<codeBase>elements to the application config file to specify the exact location of each dll, and the version of .Net it requires. Apparently this works because<codebase>is checked BEFORE the probing heuristics kick in each time an assembly needs to be loaded.If that doesn't work try this.