Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: Code behind will not recompile


Message #1 by "Wray Smallwood" <wray_smallwood@a...> on Thu, 20 Feb 2003 21:16:27
The tip helped solve the problem, thanks.

The problem was the publishing method. I actually didn't care that I was 
publishing the .cs file (since it was just a learning experience, not 
production) and didn't realize it was neither necessary nor the factor 
that causes a regeneration of the MSIL.

I was publishing this with FrontPage 2000. The beauty of FP 2000 is that 
it will publish only what has been changed on the site. However this 
apparently did not extend to files that it did not know had been changed 
like the bin DLL. Even if you hit refresh in FrontPage it would show the 
old date of the DLL file. It does not get this date from the file itself, 
but instead from the contents of the file by the same name in the _vti 
hidden directory. Anyway, when you publish, it would not replace the DLL 
on the server (even though it was replacing the .cs file). Old DLL means 
old code of course since new MSIL could not be regenerated.

To solve this I instead used the FrontPage publish capability of Visual 
Studio in the Copy Project command. This works every time, plus gives you 
the ability to publish only files that are necessary to run the project. 
The disadvantage of this is that it appears not to look at the date of 
the file. Every time you publish it slams every file up to the server 
again. Another disadvantage, is that unlike FrontPage, it will not take 
care of files deleted from your project or .cs files that you 
accidentally published at one time. You must delete them manually from 
the site. FrontPage can also be told not to publish files like the .cs 
files. So, with VS, you lose quite a bit of the management that FrontPage 
can supply. I wonder if VS 2003 improves on this. An intelligent 
publisher would be a good enhancement.

  Return to Index