English 中文(简体)
Visual Studio 2008 forces me to Rebuild Web Site every time to effect any changes I make
原标题:

I have been using Visual Studio 2008 for the past 2 years or so. Recently, in 2 particular ASP.NET (with VB.NET) web sites I am forced to do a Rebuild Solution after any change, no matter how minor, even if it s just an HTML change.

In other words, I cannot load the application into the browser and make an HTML change and hit F5 as the change would not be reflected in the browser. Also, if I make a change in the code and try to run the project by clicking F5 the code change would not come into effect. I first have to rebuild, then hit F5, which obviously takes much more time.

Does anyone know why this may be happening? This does not happen with all of my projects but only with 2 in particular.

Thanks in advance, Tim

问题回答

Oh the joy of visual studio and web projects!

Things to try:

  • Clear the VSWebCache (this is usually at %USERPROFILE%VSWebCache)
  • Clear Temporary ASP.NET Files (at %WINDIR% %WINDIR%Microsoft.NETFrameworkv2.0.50727Temporary ASP.NET Files - make sure you keep the security if you delete this top level folder rather than the subfolders)
  • If you keep your machine on all the time (never a good plan for a development machine), then run iisreset

Super-late, but: http://weblogs.asp.net/scottgu/archive/2006/09/22/Tip_2F00_Trick_3A00_-Optimizing-ASP.NET-2.0-Web-Project-Build-Performance-with-VS-2005.aspx

The meat:

  • turn off "build web site as part of a solution" in the site s property pages "build" section.
  • change the drop-down to "build page" in the same location.
  • manually build-page to force an update. It even works with my issue, where it won t update any WebMethod()s.

If you see this, let me know if it works!





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签