Use Newtonsoft.Json for UploadToLinuxPackageRepository (#7745)
This commit is contained in:
parent
3cebbb4ea3
commit
85ce73dfb5
2 changed files with 6 additions and 6 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue