views:

501

answers:

3

Can we turn off the process of making Asp.net temporary files and project assemblies cache to be sure that the results we get are really fresh and they got all the latest changes?

+1  A: 

Are you using a web site (File->New Web Site), or a Web Application Project (File->New Project)?

If it's a web application project, then rebuilding it should be enough. I don't know whether web sited have a concept of a rebuild.

Also, you can just check the dates of the temporary files to see if they're correct.

John Saunders
Thanks john again for participating my questions , I usually use Web Application projects , I'll use your advice , Is it really enough for example when we have a project contained of several other projects ?Don't we need any cleaning or re-referencing the assemblies ?
Sypress
No, nothing else. "Rebuild" is the same as "Clean" + "Build". References never need to change.
John Saunders
+1  A: 

Check all of the files in your project, and make sure that none of them have a date/time stamp in the future. This confuses the compiler. To check date time stamps, use the Details view in Windows Explorer, and examine the Date Modified column.

If you are still dissatisfied with the results, use the command-line compiler. The command-line compiler does not have access to the Visual Studio cache; it is forced to use your project files that are saved to disk.

Robert Harvey
I never heard of Date/Time Stamps on project files , How can I find and edit them ? and about the compiler , yes ,maybe that be handy on these cases , thanks
Sypress
Sypress, see my edit of this answer.
Robert Harvey
This advice was something new to me , thanks
Sypress
+1  A: 

The ASP.NET website model mandates that any changed pages are automatically recompiled when requested. If those are class files (App_Code) or assemblies in the Bin folder, they would be compiled (former category) and updated to the Temporary files location upon the first subsequent request to the application.

So, I do not see any reason why the response should not be "fresh". The only case that seems possible is that you have caching enabled (at the client or the server end) and the response to the client is not really using the latest data.

Cerebrus
Sometimes it happened for me that I couldn't see the latest changes ,Usually I work in projects that contains other projects inside itself ,and I wanted to be sure that every changes that I made will effect . thatnks for your advice
Sypress