Background Information
- TFS 2015 RC2
- Release Management Server 2015
- Azure VM with 2015 deployment agent
- Physical local machine with 2015 deployment agent
Both machines need the drop location using the Through Release Management Server over HTTP(S)
option. Currently we are using the HTTP side of things over port 1000.
Workflow
- Stop App Pool (Working)
- Stop Website (Working)
- Copy website directory to backup location (Working)
- Backup Database (Working)
- Deploy Component (Not Working), using either
- xcopy
- msdeploy (web deploy package)
The Error (TL;DR)
The same error is received every time, it doesn't matter which machine or which deployment method. The component always fails with a JSON.NET issue.
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,2,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, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, 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()
Update (Workaround)
As a work around if I edit the build configuration to have a UNC path as the drop location, the deployment is successful. However I want to use the Copy build output to server
option.
C:\Builds\xxx
andC:\Drop\xxx
. The service user has full access to the server and target machines. – Qualifier