3
Vote

Visual Studio Busy when generating template

description

Hi, I found an issue with Visual Studio hanging when generating templates. Is anyone else having this issue? It would take 2 minutes for a template with just Id and Name, and sometimes even that would fail. I would wait for 30 and 45 minutes for a template with just 10 properties and the scaffolding operation would just hang visual studio.

I lost the last two days of my life to this issue, but I have the solution and I can post a pull request if others are also experiencing this issue. It ended up being an infinite recursion caused by circular class references being transversed within the plugin. The method name where the recursion issue exists is GetCodeTypesFromLocalCodeElements().

Thanks!

Rob

comments

sburdeau wrote Sep 11, 2013 at 12:23 PM

Rob,

We have also seen problems with VS 2012 hanging when adding a new controller when the MvcScaffolding package is installed. We have some other packages of our own under development also installed and had initially assumed these were the culprit. However, just yesterday I saw the issue without our packages installed.

Not sure if this is the same issue or not; do you see processor usage with your issue? We see what appears to be no processor usage, just a hang.

robwafle wrote Sep 12, 2013 at 1:43 PM

Yes, that is just what I experienced too. Hang, but no CPU usage.

sburdeau wrote Sep 12, 2013 at 3:10 PM

So, sounds like it could be the same issue. I would certainly like to see you post a pull request.

Thanks for all of the work you did on tracking down this issue.

BTW, do you know of any workaround?