Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reinstall Microsoft Visual Studio Asp.net MVC 5 Scaffolding extension

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?

like image 897
Chrille Avatar asked Nov 07 '13 12:11

Chrille


People also ask

What happened to ASP NET MVC 5?

ASP.NET 5 was EOL'd and rebranded as ASP.NET Core and it includes the functionality of "ASP.NET MVC 5" built-in. ASP.NET Core 1 and ASP.NET Core 2 can run on either . NET Core (cross-platform) or . NET Framework (Windows) because it targets .

What is scaffolding in ASP NET MVC?

ASP.NET Scaffolding is a code generation framework for ASP.NET Web applications. Visual Studio 2013 includes pre-installed code generators for MVC and Web API projects. You add scaffolding to your project when you want to quickly add code that interacts with data models.

What is scaffolding in .NET core?

Scaffolding in ASP.NET Core is a technique used to generate code at design time to support a number of common application scenarios when working with Entity Framework Core. The code generation tool is available as a Nuget package.


2 Answers

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.

like image 168
Shriike Avatar answered Sep 18 '22 19:09

Shriike


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.

like image 40
Eric Avatar answered Sep 20 '22 19:09

Eric