How to correctly refactor a control's namespace in ASP.NET
I have this situation which is rather frustrating... I have some user controls where I would like 开发者_如何学Goto rename their namespace. However, when I do this my build fails because the .designer.cs file for pages that use the controls is still generating control declarations with the OLD namespace. Is this coming from the assembly? I can't rebuild because this is obviously creating a compile-time error (those controls no longer exist in the old name). I've tried wiping out the entire file, but it is always regenerated with the old namespace.
How do I get around this without manually editing every .designer.cs file???
In the past I have used these steps with some success, but I've also had to monkey around a lot, so I maybe missing some steps. (its been a while since I had to deal with this issue)
- Close Visual Studio
- Delete all designer.cs files (backup just in case ;))
- Fire up Visual Studio again and try a rebuild
精彩评论