Use Newtonsoft.Json for UploadToLinuxPackageRepository (#7745)

This commit is contained in:
William Lee 2017-10-02 16:39:37 -07:00 committed by GitHub
parent 3cebbb4ea3
commit 85ce73dfb5
2 changed files with 6 additions and 6 deletions

View file

@ -6,7 +6,7 @@ using System;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
using NuGet.Protocol;
using Newtonsoft.Json;
namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository
{
@ -39,7 +39,7 @@ namespace Microsoft.DotNet.Cli.Build.UploadToLinuxPackageRepository
if (!message.IsSuccessStatusCode)
{
throw new FailedToAddPackageToPackageRepositoryException(
$"{message.ToJson()} failed to post file to {url} file name:{fileName} pathToPackageToUpload:{_pathToPackageToUpload}");
$"{JsonConvert.SerializeObject(message)} failed to post file to {url} file name:{fileName} pathToPackageToUpload:{_pathToPackageToUpload}");
}
return await message.Content.ReadAsStringAsync();
}