In the latest version of Visual Studio, which is 16.6.2051, it is no longer possible to install my visual studio package.
I get the error
Value cannot be null.
Parameter name: uriString
The installation was working in previous version of visual studio (possibly in the most recent version). I am sure that something has changed in Visual Studio.
However, that does not mean that my installation does not contain an error.
This is the last part of the log file (which I think is the most interesting)
30-Jun-20 20:19:33 - BEGIN: Downloading extension:
30-Jun-20 20:19:33 - END: Downloading extension:
30-Jun-20 20:19:33 - Value cannot be null.
Parameter name: uriString
30-Jun-20 20:19:33 - at System.Uri..ctor(String uriString)
at VSIXInstaller.ExtensionPackService.DownloadExtension(IFileSystem fileSystem, BaseOnlineExtension extensionToDownload, CancellationToken cancellationToken)
at VSIXInstaller.ExtensionPackService.GetExtensionByVsixId(List`1 vsixIds, String extensionPackParentName, IExtensionEngine extensionEngine, List`1 extensionsToInstall, CancellationToken cancellationToken)
30-Jun-20 20:19:33 - END: Gathering extension pack information
30-Jun-20 20:19:33 - END: Processing extension pack
30-Jun-20 20:19:33 - System.ArgumentNullException: Value cannot be null.
Parameter name: uriString
at System.Uri..ctor(String uriString)
at VSIXInstaller.ExtensionPackService.DownloadExtension(IFileSystem fileSystem, BaseOnlineExtension extensionToDownload, CancellationToken cancellationToken)
at VSIXInstaller.ExtensionPackService.GetExtensionByVsixId(List`1 vsixIds, String extensionPackParentName, IExtensionEngine extensionEngine, List`1 extensionsToInstall, CancellationToken cancellationToken)
at VSIXInstaller.ExtensionPackService.AcquireExtensionPack(IList`1 extensionsPath, IStateData stateData, Boolean isRepairSupported)
at VSIXInstaller.ExtensionPackService.ExpandExtensionPackToInstall(IStateData stateData, Boolean isRepairSupported)
at VSIXInstaller.App.Initialize(Boolean isRepairSupported)
at VSIXInstaller.App.Initialize()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
I have included the complete log in an error report to Microsoft
Does anybody know what uriString the error might be referring to and how I might fix it?
It turns out that my project contained an unnecessary file Extensions.vsext, with the following contents:
{
"description": "Read about creating extension packs at https://aka.ms/vsextpack",
"version": "1.0.0.0",
"extensions": [
{
"vsixId": "41858b2d-ff0b-4a43-80b0-f1b2d6084935",
"name": "AlignAssignments"
},
{
"vsixId": "42374550-426a-400e-96f9-237682e8dea6",
"name": "CopyAsHtml"
}
]
}
which must have been created from the project template when I created the original package.
Most likely, I selected the wrong project type when I created the project. This file is only necessary to create a so called extension pack.
I have removed this file from the project, and it has solved the problem.