Closing the Add ASP.NET MVC Dialog Box

Recently, a large project I was working on had a problem with the Add View dialog box. When you click the Add Strongly-typed View check box, the counter appears for the first time for about a second or two, and then the entire dialog just closes and disappears. If I open the dialog and press the button again, it just closes quickly.

The project uses ASP.NET MVC 2, I installed VS2010 SP1, and this problem occurs with the installed MVC3 tools update or without it. This only happens with this project, and I replicated the problem on two different development machines. If I create a new MVC2 or MVC3 project, this will not happen at all, and no other small or medium sized projects that I have.

I can create a normal view and change it to a strongly typed one by me, so there is a workaround, but it's still pretty annoying. Any ideas what could be causing this or how to fix it?

+3
source share
2 answers

Do you use version control? Make sure that all assemblies on which your project depends (that is, a link to the project itself or its reference assemblies) are synchronized. I just ran into this ("Add View" and "Add Controller" problems) after updating several projects from SVN and restoring some. The problem was fixed after I rebuilt several libraries that my MVC project depends on.

+3
source

I had the same problem and could not open the Add-> Controller dialog as described here: Add a controller after a recent update update with a dependency error . In my case, I added models to my domain, but I forgot to add contexts for these new models; such things as

 public DbSet<Region> Regions { get; set; } 

I did not have an error at compile time, and I did not use these models in the solution, so there were no errors at runtime. I think the problem could be anywhere.

0
source

Source: https://habr.com/ru/post/888697/


All Articles