5

我正在尝试在我的机器上安装新的 Visual Studio 2017 RC。由于可用磁盘空间不足,第一次尝试在下载过程中失败。之后,每次尝试再次安装它都会导致以下错误/异常:

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()]

我已经尝试过:

  • 再次下载并运行安装程序
  • 手动删除 C:\Program Files (x86)\Microsoft Visual Studio*
  • 删除了新安装的组件(Core Framework、Win SDK 等)
  • 已卸载 Visual Studio 15 预览版

我假设安装程序无法获取已安装产品的信息。异常前的一行:

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

我已经知道失败的 Visual Studio 安装有时会非常混乱,只有重新安装操作系统才能解决问题。但在我这样做之前,也许有人有解决方案或提示 - 基本上它“只是”一个 json 解析问题......

4

2 回答 2

9

原始解决方案: https ://developercommunity.visualstudio.com/content/problem/2877/install-error-0x80131500-failed-to-deserialize-pac.html

Elliot Cooley ( state.json )提到的文件位于

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

是问题所在。json解析错误很明显。我重命名/删除了文件,设置就像一个魅力。

于 2016-12-01T13:51:21.520 回答
2

我必须删除 8 个字符的十六进制字符串文件夹,然后它才起作用。

%ProgramData%\Microsoft\VisualStudio\Packages\_Instances\
于 2017-04-26T10:53:59.933 回答