Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Newtonsoft.Json to 13.03 #9103

Merged
merged 16 commits into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions .pipelines/templates/uwp-download-secure-files.yml

This file was deleted.

9 changes: 7 additions & 2 deletions .pipelines/uwp-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ pool:
vmImage: windows-2019

steps:
- template: templates/uwp-download-secure-files.yml

- task: NuGetToolInstaller@0
name: NuGetToolInstaller1
displayName: Use NuGet 5.x
Expand All @@ -45,6 +43,13 @@ steps:
restoreSolution: $(solution)
verbosityRestore: Detailed

# Signing
- task: PowerShell@2
displayName: Generate Test Signing Certificate
inputs:
targetType: filePath
filePath: source/uwp/Build/GenerateTestPFX.ps1

- task: VSBuild@1
name: VSBuild3
displayName: Build solution
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/winui3-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ steps:
inputs:
command: 'restore'
feedsToUse: config
nugetConfigPath: source/uwp/winui3/nuget.config
nugetConfigPath: source/nuget.config
restoreSolution: $(solution)
verbosityRestore: Detailed

Expand Down
2 changes: 1 addition & 1 deletion source/NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<packageSources>
<!-- remove any machine-wide sources with <clear/> -->
<clear />
<add key="AdaptiveCards-Public" value="https://microsoft.pkgs.visualstudio.com/AdaptiveCards/_packaging/AdaptiveCards-public/nuget/v3/index.json" />
<add key="AdaptiveCards-Dependencies" value="https://pkgs.dev.azure.com/shine-oss/AdaptiveCards/_packaging/AdaptiveCards-Dependencies/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources>
<clear />
Expand Down
2 changes: 1 addition & 1 deletion source/dotnet/NuGet/AdaptiveCards.Rendering.Wpf.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<dependencies>
<group targetFramework=".NETFramework4.5.2">
<dependency id="AdaptiveCards" version="3.0.2" exclude="Build,Analyzers" />
<dependency id="Newtonsoft.Json" version="11.0.2" exclude="Build,Analyzers" />
<dependency id="Newtonsoft.Json" version="13.0.3" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0-windows7.0">
<dependency id="AdaptiveCards" version="3.0.2" exclude="Build,Analyzers" />
Expand Down
6 changes: 3 additions & 3 deletions source/dotnet/NuGet/AdaptiveCards.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
<dependencies>
<group targetFramework=".NETFramework4.5.2">
<dependency id="Microsoft.CSharp" version="4.7.0" exclude="Build,Analyzers" />
<dependency id="Newtonsoft.Json" version="11.0.2" exclude="Build,Analyzers" />
<dependency id="Newtonsoft.Json" version="13.0.3" exclude="Build,Analyzers" />
<dependency id="System.Net.Http" version="4.3.4" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETStandard1.3">
<dependency id="Microsoft.CSharp" version="4.7.0" exclude="Build,Analyzers" />
<dependency id="NETStandard.Library" version="1.6.1" exclude="Build,Analyzers" />
<dependency id="Newtonsoft.Json" version="11.0.2" exclude="Build,Analyzers" />
<dependency id="Newtonsoft.Json" version="13.0.3" exclude="Build,Analyzers" />
<dependency id="System.Net.Http" version="4.3.4" exclude="Build,Analyzers" />
</group>
<group targetFramework=".NETStandard2.0">
<dependency id="Microsoft.CSharp" version="4.7.0" exclude="Build,Analyzers" />
<dependency id="Newtonsoft.Json" version="11.0.2" exclude="Build,Analyzers" />
<dependency id="Newtonsoft.Json" version="13.0.3" exclude="Build,Analyzers" />
<dependency id="System.Net.Http" version="4.3.4" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0">
Expand Down
7 changes: 3 additions & 4 deletions source/uwp/AdaptiveCardTestApp/AdaptiveCardTestApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PackageCertificateKeyFile>AdaptiveCardTestApp_TemporaryKey.pfx</PackageCertificateKeyFile>
<PackageCertificateKeyFile>Assets\AdaptiveCardTestApp_TemporaryKey.pfx</PackageCertificateKeyFile>
<RuntimeIdentifiers>win10-arm;win10-arm-aot;win10-x86;win10-x86-aot;win10-x64;win10-x64-aot</RuntimeIdentifiers>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<PackageCertificateThumbprint>77aa3eab56609f0cade526d72f0798858b01d650</PackageCertificateThumbprint>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -220,7 +219,7 @@
<Version>6.2.8</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.2</Version>
<Version>13.0.3</Version>
</PackageReference>
<PackageReference Include="System.Private.Uri">
<Version>4.3.2</Version>
Expand All @@ -240,7 +239,7 @@
<Folder Include="Model\" />
</ItemGroup>
<ItemGroup>
<None Include="AdaptiveCardTestApp_TemporaryKey.pfx" />
<None Include="Assets\AdaptiveCardTestApp_TemporaryKey.pfx" />
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
Expand Down
17 changes: 17 additions & 0 deletions source/uwp/Build/GenerateTestPfx.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
$CertificateFriendlyName = "AdaptiveCards"
$Publisher = "CN=AdaptiveCards"

$cert = New-SelfSignedCertificate -Type Custom `
-Subject $Publisher `
-KeyUsage DigitalSignature `
-FriendlyName $CertificateFriendlyName `
-CertStoreLocation "Cert:\CurrentUser\My" `
-TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.3", "2.5.29.19={text}")

$certificateBytes = $cert.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Pkcs12)

[System.IO.File]::WriteAllBytes("$PSScriptRoot\..\AdaptiveCardTestApp\Assets\AdaptiveCardTestApp_TemporaryKey.pfx", $certificateBytes)
[System.IO.File]::WriteAllBytes("$PSScriptRoot\..\PerfApp\Assets\PerfApp_TemporaryKey.pfx", $certificateBytes)
[System.IO.File]::WriteAllBytes("$PSScriptRoot\..\UWPUITestApp\Assets\UWPUITestApp_TemporaryKey.pfx", $certificateBytes)
[System.IO.File]::WriteAllBytes("$PSScriptRoot\..\UWPUnitTests\Assets\UWPUnitTests_TemporaryKey.pfx", $certificateBytes)
[System.IO.File]::WriteAllBytes("$PSScriptRoot\..\Visualizer\AdaptiveCardVisualizer_TemporaryKey.pfx", $certificateBytes)
5 changes: 2 additions & 3 deletions source/uwp/PerfApp/PerfApp.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<PackageCertificateKeyFile>PerfApp_TemporaryKey.pfx</PackageCertificateKeyFile>
<PackageCertificateThumbprint>42535185206990c017507a5d72b3127ef25f2e9b</PackageCertificateThumbprint>
<PackageCertificateKeyFile>Assets\PerfApp_TemporaryKey.pfx</PackageCertificateKeyFile>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
Expand Down Expand Up @@ -206,7 +205,7 @@
<SubType>Designer</SubType>
</AppxManifest>
<None Include="..\..\..\samples\v1.5\Elements\AdaptiveCard.json" />
<None Include="PerfApp_TemporaryKey.pfx" />
<None Include="Assets\PerfApp_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<Image Include="Assets\LockScreenLogo.scale-200.png" />
Expand Down
2 changes: 1 addition & 1 deletion source/uwp/PerfApp/PerfApp.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<AppxManifest Include="Package.appxmanifest" />
</ItemGroup>
<ItemGroup>
<None Include="PerfApp_TemporaryKey.pfx" />
<None Include="Assets\PerfApp_TemporaryKey.pfx" />
<None Include="..\..\..\samples\v1.0\Elements\AdaptiveCard.json" />
</ItemGroup>
<ItemGroup>
Expand Down
24 changes: 13 additions & 11 deletions source/uwp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ This directory contains the renderers and tooling for the UWP and Windows AppSDK

## Requirements

1. Visual Studio 2017 with C++ tooling
1. Visual Studio 2019 (UWP)/Visual Studio 2022 (WinUI3) with C++ tooling, Windows 10 SDK 10.0.18362.0, Windows 11 SDK 10.0.22621.0, .NET SDK 6.0.5

2. Run once [Build\GenerateTestPfx.ps1](.\Build\GenerateTestPfx.ps1) from an Administrator PowerShell to generate the test signing certificates required for signing test projects.

## Why C++?

Expand All @@ -33,7 +35,7 @@ The WinUI 3 Renderer currently supports the following type of testing:

## How to add a new NuGet package

Due to limitations in our build system and Test infrastructure libraries used for UI tests, the process to add new NuGet packages has changed. The new process requires us to push any NuGet packages to a new NuGet feed called `AdaptiveCards-public` where we can have packages that come from any number of sources.
Due to limitations in our build system and Test infrastructure libraries used for UI tests, the process to add new NuGet packages has changed. The new process requires us to push any NuGet packages to a new NuGet feed called `AdaptiveCards-Dependencies` where we can have packages that come from any number of sources.

### Adding / Updating a new NuGet package locally

Expand All @@ -45,7 +47,7 @@ To add or update a NuGet package locally you have to add `nuget.org` as a NuGet

2. Restart Visual Studio to load the changes

### Pushing the NuGet package to the AdaptiveCards-public feed
### Pushing the NuGet package to the AdaptiveCards-Dependencies feed

Once the new package has been tested locally and is ready to be merged:

Expand All @@ -54,7 +56,7 @@ Once the new package has been tested locally and is ready to be merged:
3. Open Visual Studio and start a Package Manager Console (Tools -> NuGet Package Manager -> Package Manager Console)
4. Manually push any nuget packages you added by typing the following into the Package manager console. You must do this from a directory under AdaptiveCards\source, the location of Nuget.config:

``` nuget.exe push -Source "AdaptiveCards-Public" -ApiKey az <PackagePath\PackageName.nupkg> -SkipDuplicate```
``` nuget.exe push -Source "AdaptiveCards-Dependencies" -ApiKey az <PackagePath\PackageName.nupkg> -SkipDuplicate```

> * You may be prompted to login before pushing any NuGet packages into the public feed
>
Expand All @@ -64,30 +66,30 @@ Once the new package has been tested locally and is ready to be merged:

If you see the following, you may be trying to run nuget.exe from a path not under AdaptiveCards\source:

>c:\nuget.exe : The specified source 'AdaptiveCards-Public' is invalid. Provide a valid source.
>c:\nuget.exe : The specified source 'AdaptiveCards-Dependencies' is invalid. Provide a valid source.
>
>At line:1 char:1
>
>c:\nuget.exe push -Source "AdaptiveCards-Public" -ApiKey az C:\Users\ ...
>c:\nuget.exe push -Source "AdaptiveCards-Dependencies" -ApiKey az C:\Users\ ...
>
> CategoryInfo : NotSpecified: (A task was canceled.:String) [], RemoteException
> FullyQualifiedErrorId : NativeCommandError
>

If you see the following error, you may not have permissions to push to "AdaptiveCards-Public"
If you see the following error, you may not have permissions to push to "AdaptiveCards-Dependencies"

> [CredentialProvider]VstsCredentialProvider - Acquired bearer token using 'ADAL Device Code'
[CredentialProvider]VstsCredentialProvider - Attempting to exchange the bearer token for an Azure DevOps session token.
Please provide credentials for: https://pkgs.dev.azure.com/ms/AdaptiveCards/_packaging/AdaptiveCards-Public/nuget/v3/index.json
UserName: An error was encountered when fetching 'PUT https://pkgs.dev.azure.com/ms/2045544b-a6e3-4bb5-b011-e5c8612f1b74/_packaging/e500b8f1-3593-4d2b-af62-bf7f3d4c9ef1/nuget/v2/'. The request will now be retried.
Please provide credentials for: https://pkgs.dev.azure.com/shine-oss/AdaptiveCards/_packaging/AdaptiveCards-Dependencies/nuget/v3/index.json
UserName: An error was encountered when fetching 'PUT https://pkgs.dev.azure.com/shine-oss/2045544b-a6e3-4bb5-b011-e5c8612f1b74/_packaging/e500b8f1-3593-4d2b-af62-bf7f3d4c9ef1/nuget/v2/'. The request will now be retried.
>
>The HTTP request to 'PUT https://pkgs.dev.azure.com/ms/2045544b-a6e3-4bb5-b011-e5c8612f1b74/_packaging/e500b8f1-3593-4d2b-af62-bf7f3d4c9ef1/nuget/v2/' has timed out after 300000ms.
>The HTTP request to 'PUT https://pkgs.dev.azure.com/shine-oss/2045544b-a6e3-4bb5-b011-e5c8612f1b74/_packaging/e500b8f1-3593-4d2b-af62-bf7f3d4c9ef1/nuget/v2/' has timed out after 300000ms.
>
>c:\nuget.exe : A task was canceled.
>
>At line:1 char:1
>
> c:\nuget.exe push -Source "AdaptiveCards-Public" -ApiKey az C:\Users\ ...
> c:\nuget.exe push -Source "AdaptiveCards-Dependencies" -ApiKey az C:\Users\ ...
>
> CategoryInfo : NotSpecified: (A task was canceled.:String) [], RemoteException
> FullyQualifiedErrorId : NativeCommandError
Expand Down
3 changes: 3 additions & 0 deletions source/uwp/UWPObjectModelTest/UWPObjectModelTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@
<PackageReference Include="MSTest.TestFramework">
<Version>2.0.0</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AdaptiveCardsObjectModel\AdaptiveCardsObjectModel.vcxproj">
Expand Down
2 changes: 1 addition & 1 deletion source/uwp/UWPTestLibrary/UWPTestLibrary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<Version>6.2.8</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.2</Version>
<Version>13.0.3</Version>
</PackageReference>
<PackageReference Include="System.Private.Uri">
<Version>4.3.2</Version>
Expand Down
5 changes: 2 additions & 3 deletions source/uwp/UWPUITestApp/UWPUITestApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<GenerateAppxPackageOnBuild>True</GenerateAppxPackageOnBuild>
<PackageCertificateThumbprint>de8b49c8e9c64c3f747145f7b7e7476aa06bb599</PackageCertificateThumbprint>
<PackageCertificateKeyFile>UWPUITestApp_TemporaryKey.pfx</PackageCertificateKeyFile>
<PackageCertificateKeyFile>Assets\UWPUITestApp_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -195,7 +194,7 @@
<Link>LinkedTestCards\Input.Text.PasswordStyle.json</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="UWPUITestApp_TemporaryKey.pfx" />
<None Include="Assets\UWPUITestApp_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AdaptiveCardsObjectModel\AdaptiveCardsObjectModel.vcxproj">
Expand Down
2 changes: 1 addition & 1 deletion source/uwp/UWPUITests/UWPUITests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="coverlet.collector" Version="1.3.0" />
<PackageReference Include="MUXTestInfra.MSTest" Version="0.0.4" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 5 additions & 3 deletions source/uwp/UWPUnitTests/UWPUnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PackageCertificateKeyFile>UWPUnitTests_TemporaryKey.pfx</PackageCertificateKeyFile>
<PackageCertificateKeyFile>Assets\UWPUnitTests_TemporaryKey.pfx</PackageCertificateKeyFile>
<UnitTestPlatformVersion Condition="'$(UnitTestPlatformVersion)' == ''">$(VisualStudioVersion)</UnitTestPlatformVersion>
<PackageCertificateThumbprint>7943b9d5394f1c44b017daf84231dfb013f43364</PackageCertificateThumbprint>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
Expand Down Expand Up @@ -141,7 +140,7 @@
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<None Include="UWPUnitTests_TemporaryKey.pfx" />
<None Include="Assets\UWPUnitTests_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<Content Include="..\AdaptiveCardTestApp\Assets\Adaptive10.png">
Expand Down Expand Up @@ -211,6 +210,9 @@
<PackageReference Include="MSTest.TestFramework">
<Version>1.4.0</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.3</Version>
</PackageReference>
<PackageReference Include="System.Private.Uri">
<Version>4.3.2</Version>
</PackageReference>
Expand Down
4 changes: 3 additions & 1 deletion source/uwp/Visualizer/AdaptiveCardVisualizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<PlatformTarget>$(Platform)</PlatformTarget>
<RuntimeIdentifiers>win10-arm;win10-arm-aot;win10-x86;win10-x86-aot;win10-x64;win10-x64-aot</RuntimeIdentifiers>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<PackageCertificateThumbprint>9879e503330076b79a2643c6ceafd0f8b5598215</PackageCertificateThumbprint>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -86,6 +85,9 @@
<PackageReference Include="Microsoft.UI.Xaml">
<Version>2.8.6</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.3</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json.Schema">
<Version>3.0.11</Version>
</PackageReference>
Expand Down
11 changes: 0 additions & 11 deletions source/uwp/winui3/NuGet.config

This file was deleted.

Loading