Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
dotnet 5.0 (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhitong authored Dec 22, 2020
1 parent 5809bd5 commit 31bb3ca
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Core EditorConfig Options #
###############################

# dotnet-format requires version 3.1.37601
# dotnet-format requires version 5.0.100
# dotnet tool update -g dotnet-format
# remember to have: git config --global core.autocrlf false #(which is usually default)

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: .NET Core Test
on: pull_request

env:
DOTNET_VERSION: 3.0.100
DOTNET_VERSION: 5.0.100

jobs:

Expand All @@ -22,8 +22,8 @@ jobs:
- name: Check format
if: runner.os == 'Linux'
run: |
dotnet tool install --version 3.2.111002 --tool-path ./ dotnet-format --add-source https://dotnet.myget.org/F/format/api/v3/index.json
./dotnet-format --check --dry-run -v diagnostic
dotnet tool install --version 5.0.142902 --tool-path ./ dotnet-format --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
./dotnet-format --check -v diagnostic
- name: Build CLI
if: runner.os == 'Linux'
run: |
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.0 AS Build
FROM mcr.microsoft.com/dotnet/sdk:5.0.0 AS Build

COPY neo-cli /neo-cli
COPY Neo.ConsoleService /Neo.ConsoleService
Expand All @@ -7,7 +7,7 @@ COPY NuGet.Config /neo-cli
WORKDIR /neo-cli
RUN dotnet restore && dotnet publish -c Release -o /app

FROM mcr.microsoft.com/dotnet/core/runtime:3.0 AS Final
FROM mcr.microsoft.com/dotnet/runtime:5.0.0 AS Final
RUN apt-get update && apt-get install -y \
screen \
libleveldb-dev \
Expand Down
1 change: 1 addition & 0 deletions Neo.ConsoleService/ConsoleServiceBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ public void Run(string[] args)
}
else
{
Debug.Assert(OperatingSystem.IsWindows());
ServiceBase.Run(new ServiceProxy(this));
}
}
Expand Down
6 changes: 3 additions & 3 deletions Neo.ConsoleService/Neo.ConsoleService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<Copyright>2015-2020 The Neo Project</Copyright>
<Version>1.0.0</Version>
<Version>1.1.0</Version>
<Authors>The Neo Project</Authors>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<PackageProjectUrl>https://github.com/neo-project/neo-node</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
Expand All @@ -13,7 +13,7 @@

<ItemGroup>
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.7.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="5.0.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion neo-cli/neo-cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AssemblyTitle>Neo.CLI</AssemblyTitle>
<Version>3.0.0-preview4</Version>
<Authors>The Neo Project</Authors>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<AssemblyName>neo-cli</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>Neo.CLI</PackageId>
Expand Down
54 changes: 27 additions & 27 deletions neo-gui/GUI/Wrappers/SignerWrapper.cs
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
using Neo.Cryptography.ECC;
using Neo.Network.P2P.Payloads;
using System.Collections.Generic;
using System.ComponentModel;

namespace Neo.GUI.Wrappers
{
internal class SignerWrapper
{
[TypeConverter(typeof(UIntBaseConverter))]
public UInt160 Account { get; set; }
public WitnessScope Scopes { get; set; }
public List<UInt160> AllowedContracts { get; set; } = new List<UInt160>();
public List<ECPoint> AllowedGroups { get; set; } = new List<ECPoint>();

public Signer Unwrap()
{
return new Signer
{
Account = Account,
Scopes = Scopes,
AllowedContracts = AllowedContracts.ToArray(),
AllowedGroups = AllowedGroups.ToArray()
};
}
}
}
using Neo.Cryptography.ECC;
using Neo.Network.P2P.Payloads;
using System.Collections.Generic;
using System.ComponentModel;

namespace Neo.GUI.Wrappers
{
internal class SignerWrapper
{
[TypeConverter(typeof(UIntBaseConverter))]
public UInt160 Account { get; set; }
public WitnessScope Scopes { get; set; }
public List<UInt160> AllowedContracts { get; set; } = new List<UInt160>();
public List<ECPoint> AllowedGroups { get; set; } = new List<ECPoint>();

public Signer Unwrap()
{
return new Signer
{
Account = Account,
Scopes = Scopes,
AllowedContracts = AllowedContracts.ToArray(),
AllowedGroups = AllowedGroups.ToArray()
};
}
}
}
4 changes: 2 additions & 2 deletions neo-gui/neo-gui.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Copyright>2016-2020 The Neo Project</Copyright>
<AssemblyTitle>Neo.GUI</AssemblyTitle>
<Version>3.0.0-preview4</Version>
<Authors>The Neo Project</Authors>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net5.0-windows</TargetFramework>
<RootNamespace>Neo</RootNamespace>
<UseWindowsForms>true</UseWindowsForms>
<Company>The Neo Project</Company>
Expand Down
36 changes: 18 additions & 18 deletions tests/Neo.ConsoleService.Tests/Neo.ConsoleService.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<RootNamespace>neo_cli.Tests</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.0" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Neo.ConsoleService\Neo.ConsoleService.csproj" />
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>neo_cli.Tests</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Neo.ConsoleService\Neo.ConsoleService.csproj" />
</ItemGroup>

</Project>

0 comments on commit 31bb3ca

Please sign in to comment.