Skip to content

Commit

Permalink
Update Visual Studio 2022 and .NET 6 (#184)
Browse files Browse the repository at this point in the history
* Update Visual Studio 2022 and .NET 6

* Update target framework for test projects

* Fixed dotnet-format error

* Remove obsolete method and update package

* Remove `include-prerelease` option
  • Loading branch information
shibayan authored Nov 8, 2021
1 parent 8d42ddb commit bb45238
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ master ]

env:
DOTNET_VERSION: 5.0.x
DOTNET_VERSION: 6.0.x

jobs:
build:
Expand All @@ -30,4 +30,4 @@ jobs:
run: dotnet test -c Release --no-build

- name: Lint C# code
run: dotnet format --check --verbosity detailed --no-restore
run: dotnet format --verify-no-changes --verbosity detailed --no-restore
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
tags: [ v* ]

env:
DOTNET_VERSION: 5.0.x
DOTNET_VERSION: 6.0.x

jobs:
publish:
Expand Down
2 changes: 1 addition & 1 deletion Sharprompt.Example/Sharprompt.Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Sharprompt.Tests/Sharprompt.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
4 changes: 2 additions & 2 deletions Sharprompt.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29123.88
# Visual Studio Version 17
VisualStudioVersion = 17.0.31815.197
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sharprompt", "Sharprompt\Sharprompt.csproj", "{32B1CF1F-4683-4B04-B435-424EC5EE0E40}"
EndProject
Expand Down
13 changes: 0 additions & 13 deletions Sharprompt/Prompt.Basic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,6 @@ public static string Password(Action<PasswordOptions> configure)
return Password(options);
}

[Obsolete("This is obsolete and will be removed in a future version. Use Password(message, passwordChar, validators) instead.")]
public static string Password(string message, IList<Func<object, ValidationResult>> validators = default)
{
var options = new PasswordOptions
{
Message = message
};

options.Validators.Merge(validators);

return Password(options);
}

public static string Password(string message, string passwordChar = "*", IList<Func<object, ValidationResult>> validators = default)
{
var options = new PasswordOptions
Expand Down

0 comments on commit bb45238

Please sign in to comment.