9

I hade a problem with scaffolding in Asp.Net MVC 5 and Visual studio 2013 I tried to reinstall the extension "Microsoft Visual Studio Asp.net MVC 5 Scaffolding" by first uninstalled it. But I cant find any way to install it again.

I tried to repair visual studio. - no luck I tried to uninstall visual studio and install visual studio, but the extension is still missing

Do I have to reinstall the PC or is there a quick fix?

taylonr
  • 10,732
  • 5
  • 37
  • 66
Chrille
  • 126
  • 1
  • 6

8 Answers8

2

I wanted to add to Chrille's answer.

The PendingDeletes can be found in

HKEY_USERS\<SID>\Software\Microsoft\VisualStudio\12.0Exp\ExtensionManager

And

 HKEY_USERS\<SID>\Software\Microsoft\VisualStudio\12.0\ExtensionManager

And I found the AppData in my local and Roaming app data.

Harikrishnan
  • 9,688
  • 11
  • 84
  • 127
Shriike
  • 1,351
  • 9
  • 20
2

Here's what I did. It was a bit more involved than what everyone else was reporting. I tried doing a repair in the Control Panel, it ran for several hours and then failed. Perhaps my problems were that I installed VS2013 sp1 and then upgraded it to SP4 before I removed "Microsoft Visual Studio Asp.net MVC 5 Scaffolding."

I downloaded and installed Visual Studio Premium with Update 4 and then did a repair using that file, but the extension was still missing. I then found the AspNetWebFrameworksTools_VS12_ENU.msi in the en_visual_studio_premium_2013_with_update_4_x86_dvd_5935086.iso and did an uninstall and a reinstall, but the extension was still missing.

I extracted the packages\WPT\AspNetWebFrameworksTools_VS12_ENU.msi file from my .iso file using msiexec. In order to get the .msi file to extract successfully, I also had to place the *.cab files from \packages\WPT into the same folder I was extracting the .msi from. Once I'd extracted my msi file, I went into it's folder structure and found the Scaffolding stuff. It was in Dest\Microsoft ASP.NET\ASP.NET Web Stack 5\VS_12_COMMON7_IDE\Extensions\Microsoft\Web\Mvc\Scaffolding folder.

Once I had that, I still didn't have a .vsix file that I could install into Visual Studio. So what I did was create my own .vsix file. I did a little research on the web and created a file called [Content_Types].xml, it's literally called that. I renamed the file extension on several .vsix files that I had downloaded on my system to .zip and looked inside them to see what the contents of my [Content_Types].xml should look like, here's what I came up with:

<?xml version="1.0" encoding="utf-8"?>
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
  <Default Extension="dll" ContentType="application/octet-stream" />
  <Default Extension="pkgdef" ContentType="text/plain" />
  <Default Extension="vsixmanifest" ContentType="text/xml" />
  <Default Extension="txt" ContentType="text/plain" />
</Types>

I then zipped up [Content_Types].xml, extension.vsixmanifest, and Microsoft.AspNet.Scaffolding.Mvc.5.0.dll to a zip file called Microsoft.AspNet.Scaffolding.Mvc.5.0.zip. I then renamed that .zip file to Microsoft.AspNet.Scaffolding.Mvc.5.0.vsix. I then was able to install the extension using this .vsix file that I created.

Eric
  • 2,861
  • 6
  • 28
  • 59
1

Fixed it by deleting pendling delete in the registy + deleted AppData for Visual studio

AppData will be recreated at startup of vs

Chrille
  • 126
  • 1
  • 6
1

I found that uninstall the AspNetWebFrameworksTools_VS12_ENU.msi in the vs2013 ISO. And install it.

  • I did this, but the "Microsoft Visual Studio Asp.net MVC 5 Scaffolding" is still missing for me. – Eric Dec 30 '14 at 19:30
  • To clarify a bit, if I'm reading your answer correctly, I believe that you uninstalled AspNetWebFrameworksTools_VS12_ENU.msi in the vs2013 iso and then reinstalled it and the "Microsoft Visual Studio Asp.net MVC 5 Scaffolding" appeared in your extensions list again? I did this, but the "Microsoft Visual Studio Asp.net MVC 5 Scaffolding" is still missing for me. – Eric Dec 30 '14 at 19:37
  • I did poke around in AspNetWebFrameworksTools_VS12_ENU.msi with Super Orca and found C_VISUALSTUDIO_Microsoft.AspNet.Scaffolding.Mvc.5.0.dll inside it. I tried doing a repair on it as well, but "Microsoft Visual Studio Asp.net MVC 5 Scaffolding" is still missing from Visual Studio. – Eric Dec 30 '14 at 20:08
  • I've used msiexec in my command line to extract the contents of AspNetWebFrameworksTools_VS12_ENU.msi to a directory. I've found the folder that seems to contain the scaffolding (VS_12_COMMON7_IDE\Extensions\Microsoft\Web\Mvc\Scaffolding), but I can't figure out a way to install it. Inside that folder I see extension.vsixmanifest and Microsoft.AspNet.Scaffolding.Mvc.5.0.dll plus a templates folder. – Eric Dec 30 '14 at 21:05
1

So here's what I did...

1) I uninstalled the scaffolding through Visual Studio.

2) Deleted the registry from:

HKEY_USERS\<SID>\Software\Microsoft\VisualStudio\12.0\ExtensionManager\PendingDeletes

3) Went to Control Panel > Programs

4) Select Microsoft Visual Studio Ultimate 2013 > Hit Change

5) Choose Repair.

Pretty simple, but a little time consuming

tsacodes
  • 350
  • 3
  • 8
  • I did this, still the ""Microsoft Visual Studio Asp.net MVC 5 Scaffolding" is missing. – Eric Dec 30 '14 at 19:29
0
  1. Have 7zip installed.
  2. Download the full iso of visual studio.
  3. extract the iso to a folder.
  4. Go to \packages\WPT within that folder.
  5. Run AspNetWebFrameworksTools_VS12_ENU.msi
  6. Uninstall.
  7. Run AspNetWebFrameworksTools_VS12_ENU.msi
  8. Install.

That should do it.

To verify, create a new MVC project, and try to add a scaffold item. Don't verify with an existing project, because that may be a whole different problem.

0

I was missing the MVC controllers in scaffolding (only able to select Web API 2), then after removing MVC 5 scaffolding to reinstall I could not get it installed again.

I found downloading the .iso for VS 2013 update 4, extracting to a folder, then running AspNetWebFrameworksTools_VS12_ENU.msi to uninstall, then again to reinstall, then rebooting resolved both issues. I am now able to add controller, and I have MVC 5 controllers to choose from.

0

What worked for me was to remove the Registry keys, the AppData and the folder in this location C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions. After this, I repaired the VisualStudio from Programs and Features in control panel. I was desperate because even I uninstalled and re-installed again and the extension was not visible.

Franchesco
  • 85
  • 6