Skip to content

Commit

Permalink
Add support for .NET 5, drop support for .NET Core/Framework (#33)
Browse files Browse the repository at this point in the history
Make a fresh start and support only .NET 5, dropping .NET Core/Framework support.
  • Loading branch information
eduherminio authored Nov 10, 2020
1 parent 8256051 commit 1e7e9c7
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1
executors:
fileparser-executor:
docker:
- image: mcr.microsoft.com/dotnet/core/sdk:3.1
- image: mcr.microsoft.com/dotnet/sdk:5.0
working_directory: ~/FileParser

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup .NET Core
uses: actions/[email protected]
with:
dotnet-version: 3.1.403
dotnet-version: 5.0.100

- name: '[Ubuntu] Set version to -ci-${{ github.run_number }}'
if: matrix.os == 'ubuntu-latest'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Setup .NET Core
uses: actions/[email protected]
with:
dotnet-version: 3.1.403
dotnet-version: 5.0.100

- name: Set version to ${{ github.event.inputs.new_package_version }}
shell: pwsh
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: csharp
dist: bionic
sudo: required
mono: none
dotnet: 3.1
dotnet: 5.0
script:
- dotnet restore
- dotnet build --no-restore -c Release /p:DeterministicBuild=true
Expand Down
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project>

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>latest</LangVersion>
<Nullable>Enable</Nullable>
</PropertyGroup>
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
[sonarbugslogo]: https://sonarcloud.io/api/project_badges/measure?project=FileParser&metric=bugs
[sonarcodesmellslogo]: https://sonarcloud.io/api/project_badges/measure?project=FileParser&metric=code_smells

**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.).
**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.).

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).
- .NET Framework 4.6 was supported until v1.4.x.
- .NET Standard 2.0 and 2.1 were supported until v1.6.x.
- `Nullable` is enabled from 1.6.x.

## Purpose

Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ schedules:
- master

variables:
SdkVersion: '3.1.403'
SdkVersion: '5.0.100'

stages:
- stage: CI
Expand Down
3 changes: 1 addition & 2 deletions src/FileParser/FileParser.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.1;netstandard2.0</TargetFrameworks>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Title>FileParser</Title>
<PackageId>FileParser</PackageId>
<Version>1.6.0</Version>
<Version>2.0.0</Version>
<PackageTags>FileParser, TextParser, TextReader, File, Parser, Text, txt, Read, Reader</PackageTags>
<Tags>$(PackageTags)</Tags>
<Authors>Eduardo Cáceres</Authors>
Expand Down
2 changes: 1 addition & 1 deletion src/FileParser/Implementations/ParsedFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public List<T> ToList<T>(string? lineSeparatorToAdd = null)
{
foreach (IParsedLine parsedLine in this)
{
parsedLine.Append(lineSeparatorToAdd!);
parsedLine.Append(lineSeparatorToAdd);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/FileParser/Implementations/ParsedLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ private static char ExtractChar(ref string str)
}

char nextChar = str[0];
str = str.Substring(1);
str = str[1..];

return nextChar;
}
Expand Down
1 change: 0 additions & 1 deletion tests/FileParser.Test/FileParser.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down

0 comments on commit 1e7e9c7

Please sign in to comment.