开发者

VS 08 CodeFile Intellisense not working

I am facing problem in VS 08, after installing VS sp1 or MVC-2. In my not MVC pro开发者_StackOverflow社区ject, In code file, Intelisence not working, if I declare controls in code file it compiles but generates run-time error that controls already exist, if I remove declaration it doesn't complete.

Please suggest a solutions

Regards

Mumtaz Ali


I can't say for sure what the problem with your app is, but I've had this symptom when I've modified my ASPX/ASCX xhtml while the application has been running.

Consequently the generated designer.aspx.cs/ascx.cs file couldn't regenerate with the added/modified controls. So when I've gone to compile, the compiler has complained that the controls were missing.

When I've added them manually to my handwritten aspx.cs file and compiled it's caused a clash as the designer.ascx.cs was subsequently regenerated and now I've got duplicate conflicting declarations.

This issue has also caused the intellisense to stop working.

To solve the problem I had to:

  • Make sure the application was stopped - make sure the ASP.NET Development Server is stopped too, just for good measure.
  • Remove the offending control declaration from your handwritten aspx.cs file
  • Modify the xhtml (aspx) in some manner that would cause the designer.aspx.cs to be regenerated - i.e. remove the offending control and re-add it.
  • Recompile your application.

If this is the source of your problem, you should find that your application will recompile and your intellisense should start working again.


On right click on form in solution explorer, it showing "Convert to Web Application" it worked Thanx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜