Skip to content

Commit

Permalink
.NET core 3.1: Refactors all projects to use latest LTS version (Azur…
Browse files Browse the repository at this point in the history
…e#2660)

.NET core 2.1 support ends this month. This is bumping all project to 3.1 which is the current LTS version.

https://dotnet.microsoft.com/platform/support/policy/dotnet-core
  • Loading branch information
j82w authored Aug 9, 2021
1 parent 860870e commit 950130a
Show file tree
Hide file tree
Showing 39 changed files with 105 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<IsTestProject>true</IsTestProject>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Platform>AnyCPU</Platform>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<RootNamespace>Microsoft.Azure.Cosmos</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1193,9 +1193,11 @@
"Attributes": [],
"MethodInfo": "System.String ToString();IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"System.Type GetType()": {
"System.Type GetType()[System.Runtime.CompilerServices.NullableContextAttribute((Byte)1)]": {
"Type": "Method",
"Attributes": [],
"Attributes": [
"NullableContextAttribute"
],
"MethodInfo": "System.Type GetType();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"Void .ctor()": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<IsTestProject>true</IsTestProject>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Platform>AnyCPU</Platform>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<RootNamespace>Microsoft.Azure.Cosmos.Encryption.Tests</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AzureFunctionsVersion>v2</AzureFunctionsVersion>
<AssemblyName>Cosmos.Samples.AzureFunctions</AssemblyName>
<RootNamespace>Cosmos.Samples.AzureFunctions</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>Cosmos.Samples.BulkSupport</AssemblyName>
<RootNamespace>Cosmos.Samples.BulkSupport</RootNamespace>
<LangVersion>latest</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>Cosmos.Samples.ChangeFeed</AssemblyName>
<RootNamespace>Cosmos.Samples.ChangeFeed</RootNamespace>
<LangVersion>latest</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>Cosmos.Samples.Encryption</AssemblyName>
<RootNamespace>Cosmos.Samples.Encryption</RootNamespace>
<LangVersion>latest</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
<AssemblyName>Cosmos.Samples.Handlers</AssemblyName>
<RootNamespace>Cosmos.Samples.Handlers</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Microsoft.Azure.Cosmos.Samples/Usage/Queries/Queries.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>Cosmos.Samples.SystemTextJson</AssemblyName>
<RootNamespace>Cosmos.Samples.SystemTextJson</RootNamespace>
<LangVersion>latest</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>Cosmos.Samples.TransactionalBatch</AssemblyName>
<RootNamespace>Cosmos.Samples.TransactionalBatch</RootNamespace>
<LangVersion>latest</LangVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public sealed class IncludedPath
/// The collection of the <see cref="Index"/> objects to be applied for this included path.
/// </value>
[JsonProperty(PropertyName = Constants.Properties.Indexes)]
internal Collection<Index> Indexes { get; set; } = new Collection<Index>();
internal Collection<Cosmos.Index> Indexes { get; set; } = new Collection<Cosmos.Index>();

/// <summary>
/// Gets or sets whether this is a full index used for collection types.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public IndexingPolicy()
/// Gets or sets the indexing mode (consistent or lazy) in the Azure Cosmos DB service.
/// </summary>
/// <value>
/// One of the values of the <see cref="T:Microsoft.Azure.Documents.IndexingMode"/> enumeration.
/// One of the values of the <see cref="T:Microsoft.Azure.Cosmos.IndexingMode"/> enumeration.
/// </value>
[JsonProperty(PropertyName = Constants.Properties.IndexingMode)]
[JsonConverter(typeof(StringEnumConverter))]
Expand Down Expand Up @@ -323,7 +323,7 @@ public int GetHashCode(Collection<SpatialPath> additionalSpatialIndexes)
}
}

internal sealed class IndexEqualityComparer : IEqualityComparer<Index>
internal sealed class IndexEqualityComparer : IEqualityComparer<Cosmos.Index>
{
public static readonly IndexEqualityComparer Comparer = new IndexEqualityComparer();

Expand Down Expand Up @@ -434,8 +434,8 @@ public bool Equals(IncludedPath includedPath1, IncludedPath includedPath2)
return false;
}

HashSet<Index> indexes1 = new HashSet<Index>(includedPath1.Indexes, indexEqualityComparer);
HashSet<Index> indexes2 = new HashSet<Index>(includedPath2.Indexes, indexEqualityComparer);
HashSet<Cosmos.Index> indexes1 = new HashSet<Cosmos.Index>(includedPath1.Indexes, indexEqualityComparer);
HashSet<Cosmos.Index> indexes2 = new HashSet<Cosmos.Index>(includedPath2.Indexes, indexEqualityComparer);

return indexes1.SetEquals(indexes2);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ FROM root]]></SqlQuery>
</Input>
<Output>
<SqlQuery><![CDATA[
SELECT VALUE {"value": -7.9228162514264338E+28}
SELECT VALUE {"value": -7.922816251426434E+28}
FROM root]]></SqlQuery>
</Output>
</Result>
Expand All @@ -292,7 +292,7 @@ FROM root]]></SqlQuery>
</Input>
<Output>
<SqlQuery><![CDATA[
SELECT VALUE {"value": 7.9228162514264338E+28}
SELECT VALUE {"value": 7.922816251426434E+28}
FROM root]]></SqlQuery>
</Output>
</Result>
Expand All @@ -310,7 +310,7 @@ FROM root]]></SqlQuery>
<Result>
<Input>
<Description><![CDATA[Double MinValue]]></Description>
<Expression><![CDATA[query.Select(doc => new AnonymousType(value = -1.79769313486232E+308))]]></Expression>
<Expression><![CDATA[query.Select(doc => new AnonymousType(value = -1.7976931348623157E+308))]]></Expression>
</Input>
<Output>
<SqlQuery><![CDATA[
Expand All @@ -321,7 +321,7 @@ FROM root]]></SqlQuery>
<Result>
<Input>
<Description><![CDATA[Double MaxValue]]></Description>
<Expression><![CDATA[query.Select(doc => new AnonymousType(value = 1.79769313486232E+308))]]></Expression>
<Expression><![CDATA[query.Select(doc => new AnonymousType(value = 1.7976931348623157E+308))]]></Expression>
</Input>
<Output>
<SqlQuery><![CDATA[
Expand All @@ -343,22 +343,22 @@ FROM root]]></SqlQuery>
<Result>
<Input>
<Description><![CDATA[Single MinValue]]></Description>
<Expression><![CDATA[query.Select(doc => new AnonymousType(value = -3.402823E+38))]]></Expression>
<Expression><![CDATA[query.Select(doc => new AnonymousType(value = -3.4028235E+38))]]></Expression>
</Input>
<Output>
<SqlQuery><![CDATA[
SELECT VALUE {"value": -3.40282347E+38}
SELECT VALUE {"value": -3.4028235E+38}
FROM root]]></SqlQuery>
</Output>
</Result>
<Result>
<Input>
<Description><![CDATA[Single MaxValue]]></Description>
<Expression><![CDATA[query.Select(doc => new AnonymousType(value = 3.402823E+38))]]></Expression>
<Expression><![CDATA[query.Select(doc => new AnonymousType(value = 3.4028235E+38))]]></Expression>
</Input>
<Output>
<SqlQuery><![CDATA[
SELECT VALUE {"value": 3.40282347E+38}
SELECT VALUE {"value": 3.4028235E+38}
FROM root]]></SqlQuery>
</Output>
</Result>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ WHERE ((root["IntField"] >= -2147483648) AND (root["IntField"] <= 2147483647))]]
<Result>
<Input>
<Description><![CDATA[Abs long]]></Description>
<Expression><![CDATA[query.Where(doc => ((doc.NumericField >= -9.22337203685478E+18) AndAlso (doc.NumericField <= 9.22337203685478E+18))).Select(doc => Abs(Convert(doc.NumericField, Int64)))]]></Expression>
<Expression><![CDATA[query.Where(doc => ((doc.NumericField >= -9.223372036854776E+18) AndAlso (doc.NumericField <= 9.223372036854776E+18))).Select(doc => Abs(Convert(doc.NumericField, Int64)))]]></Expression>
</Input>
<Output>
<SqlQuery><![CDATA[
SELECT VALUE ABS(root["NumericField"])
FROM root
WHERE ((root["NumericField"] >= -9.2233720368547758E+18) AND (root["NumericField"] <= 9.2233720368547758E+18))]]></SqlQuery>
WHERE ((root["NumericField"] >= -9.223372036854776E+18) AND (root["NumericField"] <= 9.223372036854776E+18))]]></SqlQuery>
</Output>
</Result>
<Result>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ public async Task WithClientEncryptionPolicyFailureTest()
}
catch (ArgumentNullException ex)
{
Assert.IsTrue(ex.Message.Contains("Parameter name: Path"));
Assert.IsTrue(ex.Message.Contains("Parameter 'Path'"));
}

path1.Path = "/path";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public int GetHashCode(Collection<SpatialPath> additionalSpatialSpeces)
}
}

internal sealed class IndexEqualityComparer : IEqualityComparer<Index>
internal sealed class IndexEqualityComparer : IEqualityComparer<Cosmos.Index>
{
public static readonly IndexEqualityComparer Comparer = new IndexEqualityComparer();

Expand Down Expand Up @@ -318,8 +318,8 @@ public bool Equals(IncludedPath includedPath1, IncludedPath includedPath2)
return false;
}

HashSet<Index> indexes1 = new HashSet<Index>(includedPath1.Indexes, indexEqualityComparer);
HashSet<Index> indexes2 = new HashSet<Index>(includedPath2.Indexes, indexEqualityComparer);
HashSet<Cosmos.Index> indexes1 = new HashSet<Cosmos.Index>(includedPath1.Indexes, indexEqualityComparer);
HashSet<Cosmos.Index> indexes2 = new HashSet<Cosmos.Index>(includedPath2.Indexes, indexEqualityComparer);

return indexes1.SetEquals(indexes2);
}
Expand All @@ -328,7 +328,7 @@ public int GetHashCode(IncludedPath includedPath)
{
int hashCode = 0;
hashCode = hashCode ^ includedPath.Path.GetHashCode();
foreach (Index index in includedPath.Indexes)
foreach (Cosmos.Index index in includedPath.Indexes)
{
hashCode = hashCode ^ indexEqualityComparer.GetHashCode(index);
}
Expand Down
Loading

0 comments on commit 950130a

Please sign in to comment.