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

[Dependencies]: Removes direct reference for Newtonfoft package and add a target build. #4839

Merged
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
58abd9b
Add target build for Newtonsoft package
aavasthy Oct 11, 2024
dfde42c
Ensure project reference has newtonsoft but nuget reference doesnt.
aavasthy Oct 11, 2024
a5ba0db
Merge branch 'master' into users/aavasthy/AddBuildTarget_NewtonSoft
aavasthy Oct 11, 2024
69bf9aa
Update code to ensure that newtonsoft package is available at runtime…
aavasthy Oct 14, 2024
83ccc4b
Code cleanup.
aavasthy Oct 14, 2024
1dbfe4f
Taking latest from master.
aavasthy Oct 14, 2024
81a2875
Code cleanup.
aavasthy Oct 14, 2024
9342199
Merge with master.
aavasthy Oct 14, 2024
660dfb2
Update packages.
aavasthy Oct 21, 2024
e95ada8
Updated code to fail consumer app build
aavasthy Oct 22, 2024
32c648d
Merge branch 'master' into users/aavasthy/AddBuildTarget_NewtonSoft2
aavasthy Oct 22, 2024
dbf48b8
update targets file.
aavasthy Oct 22, 2024
a24235d
Updating newtonsoft reference
aavasthy Oct 22, 2024
e7cea52
Updating newtonsoft reference
aavasthy Oct 22, 2024
5c47dfc
Update targets file.
aavasthy Oct 22, 2024
43cf584
Update targets file to ensure build failure without Newtonsoft.
aavasthy Oct 24, 2024
8157154
Merge branch 'master' into users/aavasthy/AddBuildTarget_NewtonSoft2
aavasthy Oct 24, 2024
7351478
Adding Newtonsoft for encryption projects.
aavasthy Oct 24, 2024
add93b8
Adding Newtonsoft for encryption projects.
aavasthy Oct 24, 2024
5114ae3
Update newtonsoft supported version in error message.
aavasthy Oct 25, 2024
8ef1a80
Merge branch 'master' into users/aavasthy/AddBuildTarget_NewtonSoft2
aavasthy Oct 28, 2024
2fd3f8c
Update targets file to ensure newtonsoft update can cater to more sce…
aavasthy Oct 30, 2024
59796c8
Code cleanup for targets file with newtonsoft changes.
aavasthy Oct 30, 2024
2859047
Merge branch 'master' into users/aavasthy/AddBuildTarget_NewtonSoft2
aavasthy Oct 30, 2024
9966411
Update package path to ensure transitive depenedncy packages also rec…
aavasthy Nov 4, 2024
adf5c8f
Merge branch 'master' into users/aavasthy/AddBuildTarget_NewtonSoft2
aavasthy Nov 4, 2024
659f591
Merge branch 'master' into users/aavasthy/AddBuildTarget_NewtonSoft2
aavasthy Nov 5, 2024
d3bf695
Updating disable check and updating packagepath for nugets.
aavasthy Nov 5, 2024
b879ccc
Updating realtive paths for packages.
aavasthy Nov 5, 2024
97b8ccd
Adding two package paths to cover transitive dependency scenarios for…
aavasthy Nov 7, 2024
f95e735
Merge branch 'master' into users/aavasthy/AddBuildTarget_NewtonSoft2
aavasthy Nov 7, 2024
3b9282f
Update AfterTargets toResolveAssemblyReferences
aavasthy Nov 8, 2024
2e7ab46
Merge branch 'master' into users/aavasthy/AddBuildTarget_NewtonSoft2
aavasthy Nov 8, 2024
6d38b1e
Code cleanup
aavasthy Nov 8, 2024
22ea608
Merge branch 'master' into users/aavasthy/AddBuildTarget_NewtonSoft2
aavasthy Nov 11, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
<PackageReference Include="Azure.Identity" Version="1.11.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.2" NoWarn="NU1903" PrivateAssets="All" />
aavasthy marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<ItemGroup>
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.2" NoWarn="NU1903" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="16.0.102" PrivateAssets="All" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.2" NoWarn="NU1903" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.2" NoWarn="NU1903" PrivateAssets="All" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
Expand All @@ -134,6 +134,7 @@
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.0" />
</ItemGroup>


<ItemGroup Condition=" '$(ProjectRef)' != 'True' ">
<None Include="$(OutputPath)\Cosmos.CRTCompat.dll" Pack="true" IsAssembly="true" PackagePath="runtimes\win-x64\native" />
Expand Down
15 changes: 14 additions & 1 deletion Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.targets
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,18 @@ Copyright (C) Microsoft Corporation. All rights reserved.
<Visible>False</Visible>
</ContentWithTargetPath>
</ItemGroup>



<!-- Add check for Newtonsoft.Json package in cosnumer app. -->
<Target Name="CheckNewtonsoftJsonVersion" BeforeTargets="CoreCompile" Condition="'$(ExcludeRestorePackageImports)' != 'true'">

<ItemGroup>
<NewtonsoftJsonPackageReference Include="@(PackageReference)" Condition="'%(PackageReference.Identity)' == 'Newtonsoft.Json'" />
aavasthy marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>
<!-- If Newtonsoft.Json is not referenced, fail the build -->
<Error Text="The Newtonsoft.Json package must be explicitly referenced with version >= 10.0.2."
Condition="'@(NewtonsoftJsonPackageReference)' == ''" />
Pilchie marked this conversation as resolved.
Show resolved Hide resolved
aavasthy marked this conversation as resolved.
Show resolved Hide resolved

</Target>

</Project>