Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2017 RC install error 0x80131500 Failed to deserialize packages

I'm trying to install the new Visual Studio 2017 RC on one on my machines. The first attempt failed during download because of not enough free disc space. After that each try of install it again results in following error/excpetion:

2016-11-17T16:50:08 : Error : Failed to get installed product summaries. [installerId: SetupEngine, error: JsonReaderException at    bei Newtonsoft.Json.JsonTextReader.ReadStringIntoBuffer(Char quote)

   bei Newtonsoft.Json.JsonTextReader.ParseString(Char quote, ReadType readType)
   bei Newtonsoft.Json.JsonTextReader.ReadStringValue(ReadType readType)
   bei Newtonsoft.Json.JsonTextReader.ReadAsString()
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   bei Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   bei Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   bei Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
   bei Microsoft.VisualStudio.Setup.Serialization.ModelSerializer`1.Deserialize(TextReader reader)
   bei Microsoft.VisualStudio.Setup.Cache.InstanceRepository.GetInstance()
   bei Microsoft.VisualStudio.Setup.Cache.CacheRepository.<GetInstances>d__25.MoveNext()
   bei Microsoft.VisualStudio.Setup.InstalledProductsProviderService.GetInstalledProductSummariesImpl()
   bei Microsoft.VisualStudio.Setup.InstalledProductsProviderService.GetInstalledProductSummaries()]

I already tried:

  • download and run the installer again
  • manual delete C:\Program Files (x86)\Microsoft Visual Studio*
  • removed already new installed components (Core Framework, Win SDK etc.)
  • uninstalled Visual Studio 15 Preview

I assume that somehow the installer can't get the information which products are already installed. One line before the excpetion:

2016-11-17T16:50:08 : Verbose : Getting product summaries. [installerId: SetupEngine]

I already know that failed Visual Studio installations sometimes are so messed up that only a OS reinstall solves the problem. But before I do this maybe someone has a solution or hint - basically its "just" a json parsing problem ...

like image 771
Andreas Avatar asked Nov 17 '16 16:11

Andreas


2 Answers

Orginal solution: https://developercommunity.visualstudio.com/content/problem/2877/install-error-0x80131500-failed-to-deserialize-pac.html

The file mentioned by Elliot Cooley (state.json) found under

%ProgramData%\Microsoft\VisualStudio\Packages\_Instances\<instance> where "instance" is an 8 character Hex string.

was the problem. The json parsing error was obvious. I renamed/deleted the file and the setup works like a charm.

like image 98
Andreas Avatar answered Oct 31 '22 19:10

Andreas


I had to remove the 8 character hex string folder, then it worked.

%ProgramData%\Microsoft\VisualStudio\Packages\_Instances\
like image 35
Kadir Ercetin Avatar answered Oct 31 '22 20:10

Kadir Ercetin