Skip to content

Commit

Permalink
[Infra] Adding .net6.0 support to the packages (microsoft#3086)
Browse files Browse the repository at this point in the history
* [Infra] Adding .net6.0 support to the packages

* [Infra] Update AppVetor image to Visual Studio 2022

* [Infra] Update PR build script

* [Infra] restore projects one by one

* [Infra] Removing the NuGet.Config for the PR build

* [Infra] MSBuild

* [Infra] Restore

* [Infra] fixing PR pipeline

* [Infra] Nuget 5.8

* [Infra] msbuild

* [Infra] typo in TargetFramework

* [Infra] back to nuget.exe

* [Infra] upgrade nuget.exe to 6.x

* [Infra] returning the build back

* [Infra] echo nuget version

* -[Infra] fixing typo in validation project

* [Infra] fixing JAVA path

* [Infra] typo fix

* [Infra] fix cd

* [Infra] clean ups

* [Infra] removing net6 from validationTool project

* [Infra] change ValidationTool to net6.0 only

* [Infra] upgrade to python 3.11 with fixing the failing tests

* [Infra] clean-up
  • Loading branch information
FARHAD SHAKERIN authored Apr 3, 2023
1 parent 665ad11 commit 3802de2
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .NET/Build.CI.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ IF %ERRORLEVEL% NEQ 0 (

ECHO.
ECHO # Restoring NuGet dependencies
CALL "buildtools\nuget" restore
CALL !MSBuild! Microsoft.Recognizers.Text.sln /t:Restore

set configuration=Release
ECHO.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>netstandard2.1;netstandard2.0;net462;net6.0</TargetFrameworks>
<LangVersion>9</LangVersion>
<!-- Disable GenerateAssemblyInfo to use the existing AssemblyInfo.cs -->
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>netstandard2.1;netstandard2.0;net462;net6.0</TargetFrameworks>
<LangVersion>9</LangVersion>
<!-- Disable GenerateAssemblyInfo to use the existing AssemblyInfo.cs -->
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net462</TargetFrameworks>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>9</LangVersion>
<IsPackable>false</IsPackable>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>net6.0</TargetFrameworks>
<LangVersion>9</LangVersion>
<IsPackable>false</IsPackable>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>netstandard2.1;netstandard2.0;net462;net6.0</TargetFrameworks>
<LangVersion>9</LangVersion>
<!-- Disable GenerateAssemblyInfo to use the existing AssemblyInfo.cs -->
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>netstandard2.1;netstandard2.0;net462;net6.0</TargetFrameworks>
<LangVersion>9</LangVersion>
<!-- Disable GenerateAssemblyInfo to use the existing AssemblyInfo.cs -->
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public ArabicNumberParserConfiguration(INumberOptionsConfiguration config)
}

this.CultureInfo = new CultureInfo(culture);
this.CultureInfo.NumberFormat.NegativeSign = "-";
this.CultureInfo.NumberFormat.NumberDecimalSeparator = ".";

this.IsCompoundNumberLanguage = NumbersDefinitions.CompoundNumberLanguage;
this.IsMultiDecimalSeparatorCulture = NumbersDefinitions.MultiDecimalSeparatorCulture;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>netstandard2.1;netstandard2.0;net462;net6.0</TargetFrameworks>
<LangVersion>9</LangVersion>
<!-- Disable GenerateAssemblyInfo to use the existing AssemblyInfo.cs -->
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public SwedishNumberParserConfiguration(INumberOptionsConfiguration config)
this.Config = config;
this.LanguageMarker = NumbersDefinitions.LangMarker;
this.CultureInfo = new CultureInfo(config.Culture);
this.CultureInfo.NumberFormat.NegativeSign = "-";

this.IsCompoundNumberLanguage = NumbersDefinitions.CompoundNumberLanguage;
this.IsMultiDecimalSeparatorCulture = NumbersDefinitions.MultiDecimalSeparatorCulture;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>netstandard2.1;netstandard2.0;net462;net6.0</TargetFrameworks>
<LangVersion>9</LangVersion>
<!-- Disable GenerateAssemblyInfo to use the existing AssemblyInfo.cs -->
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>netstandard2.1;netstandard2.0;net462;net6.0</TargetFrameworks>
<LangVersion>9</LangVersion>
<!-- Disable GenerateAssemblyInfo to use the existing AssemblyInfo.cs -->
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>netstandard2.1;netstandard2.0;net462;net6.0</TargetFrameworks>
<LangVersion>9</LangVersion>
<!-- Disable GenerateAssemblyInfo to use the existing AssemblyInfo.cs -->
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down
2 changes: 1 addition & 1 deletion .NET/Samples/SimpleConsole/SimpleConsole.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>9</LangVersion>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<CodeAnalysisRuleSet>../../Recognizers-Text.ruleset</CodeAnalysisRuleSet>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ def timex_datetime_add(start, duration):
@staticmethod
def date_from_timex(timex):
return date(
timex.year if timex.year is not None else 2001,
timex.month if timex.month is not None else 1,
timex.day_of_month if timex.day_of_month is not None else 1
int(timex.year) if timex.year is not None else 2001,
int(timex.month) if timex.month is not None else 1,
int(timex.day_of_month) if timex.day_of_month is not None else 1
)

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion Tools/src/ValidationTool/ValidationTool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>9</LangVersion>
</PropertyGroup>

Expand Down
8 changes: 4 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# AppVeyor build configuration for JavaScript project
version: 1.0.{build}

image: Visual Studio 2019
image: Visual Studio 2022
environment:
nodejs_version: "14.17.6"
PYTHON: "C:\\Python36-x64"
JAVA_HOME: "C:\\Program Files\\Java\\jdk11"
PYTHON: "C:\\Python311-x64"
JAVA_HOME: "C:\\Program Files (x86)\\Java\\jdk1.8.0"
platform: Any CPU
configuration: Release

Expand Down Expand Up @@ -54,7 +54,7 @@ build_script:
cd ..\java\
build.ci.cmd
test:

test_script:
Expand Down

0 comments on commit 3802de2

Please sign in to comment.