Skip to content

Commit 1e7e9c7

Browse files
authored
Add support for .NET 5, drop support for .NET Core/Framework (#33)
Make a fresh start and support only .NET 5, dropping .NET Core/Framework support.
1 parent 8256051 commit 1e7e9c7

File tree

11 files changed

+13
-12
lines changed

11 files changed

+13
-12
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2.1
22
executors:
33
fileparser-executor:
44
docker:
5-
- image: mcr.microsoft.com/dotnet/core/sdk:3.1
5+
- image: mcr.microsoft.com/dotnet/sdk:5.0
66
working_directory: ~/FileParser
77

88
jobs:

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Setup .NET Core
2626
uses: actions/[email protected]
2727
with:
28-
dotnet-version: 3.1.403
28+
dotnet-version: 5.0.100
2929

3030
- name: '[Ubuntu] Set version to -ci-${{ github.run_number }}'
3131
if: matrix.os == 'ubuntu-latest'

.github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: Setup .NET Core
5151
uses: actions/[email protected]
5252
with:
53-
dotnet-version: 3.1.403
53+
dotnet-version: 5.0.100
5454

5555
- name: Set version to ${{ github.event.inputs.new_package_version }}
5656
shell: pwsh

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: csharp
22
dist: bionic
33
sudo: required
44
mono: none
5-
dotnet: 3.1
5+
dotnet: 5.0
66
script:
77
- dotnet restore
88
- dotnet build --no-restore -c Release /p:DeterministicBuild=true

Directory.Build.props

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project>
22

33
<PropertyGroup>
4+
<TargetFramework>net5.0</TargetFramework>
45
<LangVersion>latest</LangVersion>
56
<Nullable>Enable</Nullable>
67
</PropertyGroup>

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@
3030
[sonarbugslogo]: https://sonarcloud.io/api/project_badges/measure?project=FileParser&metric=bugs
3131
[sonarcodesmellslogo]: https://sonarcloud.io/api/project_badges/measure?project=FileParser&metric=code_smells
3232

33-
**FileParser** is a **.NET Standard** library designed to read text files line-by-line, saving each line's content into basic types vars (int, double, string, etc.).
33+
**FileParser** is a **.NET** library designed to read text files line-by-line, saving each line's content into basic types vars (int, double, string, etc.).
3434

35-
It is also available (since v1.0) for .NET Framework 4.6, and I'll do my best to keep it that way in future FileParser versions. More info about .NET Standard & .NET Framework compatibility can be found [here](https://docs.microsoft.com/es-es/dotnet/standard/net-standard#net-implementation-support).
35+
- .NET Framework 4.6 was supported until v1.4.x.
36+
- .NET Standard 2.0 and 2.1 were supported until v1.6.x.
37+
- `Nullable` is enabled from 1.6.x.
3638

3739
## Purpose
3840

azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ schedules:
99
- master
1010

1111
variables:
12-
SdkVersion: '3.1.403'
12+
SdkVersion: '5.0.100'
1313

1414
stages:
1515
- stage: CI

src/FileParser/FileParser.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netstandard2.1;netstandard2.0</TargetFrameworks>
43
<IncludeSymbols>true</IncludeSymbols>
54
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
65
<Title>FileParser</Title>
76
<PackageId>FileParser</PackageId>
8-
<Version>1.6.0</Version>
7+
<Version>2.0.0</Version>
98
<PackageTags>FileParser, TextParser, TextReader, File, Parser, Text, txt, Read, Reader</PackageTags>
109
<Tags>$(PackageTags)</Tags>
1110
<Authors>Eduardo Cáceres</Authors>

src/FileParser/Implementations/ParsedFile.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public List<T> ToList<T>(string? lineSeparatorToAdd = null)
8181
{
8282
foreach (IParsedLine parsedLine in this)
8383
{
84-
parsedLine.Append(lineSeparatorToAdd!);
84+
parsedLine.Append(lineSeparatorToAdd);
8585
}
8686
}
8787

src/FileParser/Implementations/ParsedLine.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private static char ExtractChar(ref string str)
164164
}
165165

166166
char nextChar = str[0];
167-
str = str.Substring(1);
167+
str = str[1..];
168168

169169
return nextChar;
170170
}

tests/FileParser.Test/FileParser.Test.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
54
<IsPackable>false</IsPackable>
65
</PropertyGroup>
76

0 commit comments

Comments
 (0)