bennor / AutoT4MVC

A zero-configuration Visual Studio 2012+ extension for automatically running T4MVC templates on build and when files are modified in paths that T4MVC cares about.

Home Page:http://bennor.github.io/AutoT4MVC/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install Error : Microsoft.VisualStudio.ExtensionManager.MissingTargetFrameworkException

mrdaneeyul opened this issue · comments

We recently updated to .NET 4.6 (though as far as I know, we still have 4.5 installed). One of our computers (but not the rest?) is having difficulty installing the plugin, with the following error:

3/14/2016 9:58:00 AM - Beginning to install extension to Microsoft Visual Studio Premium 2012 ...
3/14/2016 9:58:00 AM - Install Error : Microsoft.VisualStudio.ExtensionManager.MissingTargetFrameworkException: The extension 'AutoT4MVC' requires a version of the .NET Framework that is not installed.
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.CheckForValidDotNetFramework(IExtension extension)
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.CheckForInstallBlockers(InstallableExtensionImpl extension, IInstalledExtensionList modifiedInstalledExtensionsList, Boolean isNestedExtension, Boolean& olderVersionInstalled)
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.InstallInternal(InstallableExtensionImpl extension, Boolean perMachine, Boolean isNestedExtension, IDictionary2 extensionsInstalledSoFar, List1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, AsyncOperation asyncOp, UInt64 totalBytesToWrite, UInt64& totalBytesWritten)
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.BeginInstall(IInstallableExtension installableExtension, Boolean perMachine, AsyncOperation asyncOp)
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.InstallWorker(IInstallableExtension extension, Boolean perMachine, AsyncOperation asyncOp)

3/14/2016 9:58:00 AM - Beginning to install extension to Microsoft Visual Studio Premium 2013...
3/14/2016 9:58:00 AM - Install Error : Microsoft.VisualStudio.ExtensionManager.MissingTargetFrameworkException: The extension 'AutoT4MVC' requires a version of the .NET Framework that is not installed.
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.CheckForValidDotNetFramework(IExtension extension)
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.CheckForInstallBlockers(InstallableExtensionImpl extension, IInstalledExtensionList modifiedInstalledExtensionsList, Boolean isNestedExtension, Boolean& olderVersionInstalled)
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.InstallInternal(InstallableExtensionImpl extension, Boolean perMachine, Boolean isNestedExtension, IDictionary2 extensionsInstalledSoFar, List1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, AsyncOperation asyncOp, UInt64 totalBytesToWrite, UInt64& totalBytesWritten)
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.BeginInstall(IInstallableExtension installableExtension, Boolean perMachine, AsyncOperation asyncOp)
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.InstallWorker(IInstallableExtension extension, Boolean perMachine, AsyncOperation asyncOp)

Odd that it's happening on only one machine. Might help to run the following command on a machine that works and compare it with the machine that doesn't to see what's missing:

wmic product where "Name like 'Microsoft .Net%'" get Name, Version

Thanks for the response--sorry it took so long for me to get back to you (vacation!).

I had my coworker run the command on his machine (which is the broken one) and I ran it on mine. We came up with the same results:

Microsoft .NET Framework 4.5.1 Multi-Targeting Pack                                  4.5.50932
Microsoft .NET Framework 4.5 Multi-Targeting Pack                                    4.5.50710
Microsoft .NET Framework 4.6.1                                                       4.6.01055
Microsoft .NET Framework 4.5.1 Multi-Targeting Pack (ENU)                            4.5.50932
Microsoft .NET Framework 4.5.1 RC Multi-Targeting Pack for Windows Store Apps        4.5.21005
Microsoft .NET Framework 4.5 SDK                                                     4.5.50710
Microsoft .NET Framework 4.5.1 RC Multi-Targeting Pack for Windows Store Apps (ENU)  4.5.21005
Microsoft .NET Framework 4 Multi-Targeting Pack                                      4.0.30319
Microsoft .NET Framework 4.5.1 SDK                                                   4.5.51641

I asked him to go through all the standard stuff--uninstalling AutoT4MVC, reinstalling, and restarting the computer. Didn't seem to work.

Thanks again for your help!

I was kind of hoping that there would be something obvious in the output of that command. If there's only a problem on one machine, it has to be a problem with the configuration of that machine.

The original error shows a problem installing to VS 2012, yet you have the targeting packs for 4.6.1, etc. Is this the only machine with 2012 on it? If so, that could be the problem.

EDIT: Just noticed it's also a problem in 2013. Weird. I'm not really sure what the problem is. Can you try reinstalling the .NET framework on that machine?

I was hoping the same thing, especially since he installed it after we migrated to .NET 4.6, while everyone else did so before. I believe all of us still have VS 2012 on our machines alongside VS 2013 (some of our project solutions don't work well in 2013 since they're older). I have the tool installed in both 2012 and 2013 with no issues.

I'll see about getting .NET reinstalled on his machine. Thanks.

The latest version requires .NET 4.6, so this doesn't really apply anymore.