So I'm trying to install my Visual Studio extension in Visual Studio 2015 but I'm getting this install error when trying:
System.NullReferenceException: Object reference not set to an instance of an object
The strange thing is that I can run the extension in the experimental instance when debugging.
This is in the install log:
Beginning to install extension to Microsoft Visual Studio Professional 2015...
Install Error : System.NullReferenceException: Object reference not set to an instance of an object.
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, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, AsyncOperation asyncOp, UInt64 totalBytesToWrite, UInt64& totalBytesWritten, Boolean enforceCertificateCheckForUpgrade)
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.BeginInstall(IInstallableExtension installableExtension, Boolean perMachine, AsyncOperation asyncOp, Boolean enforceCertificateCheckForUpgrade)
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.InstallWorker(IInstallableExtension extension, Boolean perMachine, AsyncOperation asyncOp, Boolean enforceCertificateCheckForUpgrade)
Things I already tried:
- Repairing Visual Studio
- Trying it on another PC (same error)
- Trying to install it in safemode (
devenv /safemode
) devenv /resetsettings
- Trying to install via doubleclick on the vsix file instead of via a private extension gallery
- Uninstalling the extension "Developer Analytics Tools"
- Trying an older version of the code which I'm pretty sure once worked
- Checking all references, clean, rebuild
- Removing nuget packages and readding them (Newtonsoft.Json & 1 other)
Please help.