ms-release-management – 无法部署组件 – “无法反序列化当前的JSON对象……”

前端之家收集整理的这篇文章主要介绍了ms-release-management – 无法部署组件 – “无法反序列化当前的JSON对象……”前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
背景资料

> TFS 2015 RC2
> Release Management Server 2015
> Azure VM与2015部署代理
>具有2015部署代理的物理本地计算机

两台计算机都需要使用通过HTTP(S)选项通过发布管理服务器的丢弃位置.目前我们在端口1000上使用HTTP端.

工作流程

>停止应用程序池(工作)
>停止网站(工作)
>将网站目录复制到备份位置(工作)
>备份数据库(工作)
>使用其中任何一个部署组件(不工作)

> xcopy
> msdeploy(Web部署包)

错误(TL; DR)
每次都收到相同的错误,无论哪台机器或哪种部署方法都无关紧要.该组件始终因JSON.NET问题而失败.

7/22/2015 3:03:39 PM - Error - (13704,104) - Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.String[]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer,not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'ErrorMessage',line 1,position 16.: \r\n\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader,Type objectType,JsonContract contract,JsonProperty member,JsonContainerContract containerContract,JsonProperty containerMember,Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader,Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader,Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader,Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value,Type type,JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value,JsonSerializerSettings settings)
   at Microsoft.TeamFoundation.Release.Data.Proxy.RestProxy.BaseDeploymentControllerServiceProxy.GetPackageFileInfos(String packageLocation)
   at Microsoft.TeamFoundation.Release.DeploymentAgent.Services.Deployer.HttpPackageDownloader.CopyPackageAndUnpackIt(String packageSourceLocation,String filesDestinationLocation)
   at Microsoft.TeamFoundation.Release.DeploymentAgent.Services.Deployer.ComponentProcessor.CopyComponentFiles()
   at Microsoft.TeamFoundation.Release.DeploymentAgent.Services.Deployer.ComponentProcessor.DeployComponent()

更新(解决方法)
作为解决方案,如果我编辑构建配置以将UNC路径作为放置位置,则部署成功.但是我想使用Copy build output to server选项.

解决方法

卸载部署程序并安装RM 2015 RTM部署程序应解决此问题.

之前的RM版本中存在一个问题,即在部署程序自动升级期间NewtonSoft.Json dll未升级.

原文链接:https://www.f2er.com/js/157342.html

猜你在找的JavaScript相关文章