Skip to content

Commit 2cd1ef7

Browse files
committed
try net6.0
1 parent 8ade77d commit 2cd1ef7

File tree

13 files changed

+45
-39
lines changed

13 files changed

+45
-39
lines changed

.config/dotnet-tools.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
"isRoot": true,
44
"tools": {
55
"skbkontur.typescript.contractgenerator.cli": {
6-
"version": "2.0.94",
6+
"version": "2.0.105",
77
"commands": [
88
"dotnet-ts-gen"
99
]
1010
},
1111
"nbgv": {
12-
"version": "3.3.37",
12+
"version": "3.4.244",
1313
"commands": [
1414
"nbgv"
1515
]
1616
},
1717
"jetbrains.resharper.globaltools": {
18-
"version": "2020.3.3",
18+
"version": "2021.2.2",
1919
"commands": [
2020
"jb"
2121
]
2222
},
2323
"dotnet-ef": {
24-
"version": "3.1.7",
24+
"version": "6.0.0",
2525
"commands": [
2626
"dotnet-ef"
2727
]

DbViewer.EntityFramework/DbViewer.EntityFramework.csproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
4+
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
55
<AssemblyName>SkbKontur.DbViewer.EntityFramework</AssemblyName>
66
<RootNamespace>SkbKontur.DbViewer.EntityFramework</RootNamespace>
77
<PackageId>SkbKontur.DbViewer.EntityFramework</PackageId>
88
</PropertyGroup>
99

10-
<ItemGroup>
10+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
1111
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.7" />
1212
</ItemGroup>
1313

14+
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
15+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" />
16+
</ItemGroup>
17+
1418
<ItemGroup>
1519
<ProjectReference Include="..\DbViewer\DbViewer.csproj" />
1620
</ItemGroup>

DbViewer.TestApi/DbViewer.TestApi.csproj

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<AssemblyName>SkbKontur.DbViewer.TestApi</AssemblyName>
77
<RootNamespace>SkbKontur.DbViewer.TestApi</RootNamespace>
88
<OutputPath>bin\</OutputPath>
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="GroboContainer" Version="1.2.52" />
12+
<PackageReference Include="GroboContainer" Version="1.2.60" />
1313
<PackageReference Include="GroBuf" Version="1.7.3" />
14-
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.4" />
15-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.7" />
16-
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.4" />
17-
<PackageReference Include="SkbKontur.TypeScript.ContractGenerator" Version="2.0.94" />
18-
<PackageReference Include="AutoFixture" Version="4.15.0" />
14+
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.0" />
15+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0">
16+
<PrivateAssets>all</PrivateAssets>
17+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
18+
</PackageReference>
19+
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0" />
20+
<PackageReference Include="SkbKontur.TypeScript.ContractGenerator" Version="2.0.105" />
21+
<PackageReference Include="AutoFixture" Version="4.17.0" />
1922
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
2023
</ItemGroup>
2124

DbViewer.TestApi/EntityFramework/EntityFrameworkDbContext.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ namespace SkbKontur.DbViewer.TestApi.EntityFramework
88
{
99
public class EntityFrameworkDbContext : DbContext
1010
{
11+
public const string ConnectionString = "Host=localhost;Database=my_db;Username=postgres;Password=postgres";
12+
1113
public DbSet<UsersTable> Users { get; set; }
1214
public DbSet<FtpUser> FtpUsers { get; set; }
1315
public DbSet<TestTable> Tests { get; set; }
1416
public DbSet<SqlDocument> Documents { get; set; }
1517

16-
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
17-
=> optionsBuilder.UseNpgsql("Host=localhost;Database=my_db;Username=postgres;Password=postgres");
18+
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) => optionsBuilder.UseNpgsql(ConnectionString);
1819

1920
protected override void OnModelCreating(ModelBuilder modelBuilder)
2021
{

DbViewer.TestApi/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public Startup(IConfiguration configuration)
2323
public void ConfigureServices(IServiceCollection services)
2424
{
2525
services.AddControllers().AddNewtonsoftJson();
26-
services.AddDbContext<EntityFrameworkDbContext>(options => options.UseNpgsql(Configuration.GetConnectionString("EntityFrameworkDbContext")));
26+
services.AddDbContext<EntityFrameworkDbContext>(options => options.UseNpgsql(EntityFrameworkDbContext.ConnectionString));
2727
services.AddSingleton<IControllerFactory>(new GroboControllerFactory());
2828
}
2929

DbViewer.Tests/DbViewer.Tests.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<AssemblyName>SkbKontur.DbViewer.Tests</AssemblyName>
77
<RootNamespace>SkbKontur.DbViewer.Tests</RootNamespace>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="FluentAssertions" Version="5.10.3" />
12-
<PackageReference Include="Kontur.ReactUI.SeleniumTesting" Version="3.2.0" />
13-
<PackageReference Include="NUnit" Version="3.13.1" />
14-
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
15-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
11+
<PackageReference Include="FluentAssertions" Version="6.2.0" />
12+
<PackageReference Include="Kontur.ReactUI.SeleniumTesting" Version="3.5.1" />
13+
<PackageReference Include="NUnit" Version="3.13.2" />
14+
<PackageReference Include="NUnit3TestAdapter" Version="4.1.0" />
15+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

DbViewer.Tests/FrontTests/Helpers/ControlBaseExtensions.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using Kontur.Selone.Properties;
2-
3-
using NUnit.Framework;
1+
using NUnit.Framework;
42

53
using SKBKontur.SeleniumTesting;
64

@@ -20,12 +18,12 @@ public static void WaitAbsence(this ControlBase control)
2018

2119
public static void WaitIncorrect(this ControlBase control)
2220
{
23-
control.GetError().Wait().That(Is.True);
21+
control.HasError.Wait().That(Is.True);
2422
}
2523

2624
public static void WaitCorrect(this ControlBase control)
2725
{
28-
control.GetError().Wait().That(Is.False);
26+
control.HasError.Wait().That(Is.False);
2927
}
3028

3129
public static T ClickAndGoTo<T>(this ControlBase control)
@@ -39,10 +37,5 @@ private static PageBase ClickAndGetPage(this ControlBase control)
3937
control.Click();
4038
return (PageBase)control.GetRootContainer();
4139
}
42-
43-
private static IProp<bool> GetError(this ControlBase control)
44-
{
45-
return Prop.Create(control.HasError, "error");
46-
}
4740
}
4841
}

DbViewer.sln.DotSettings

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
22
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=3646A699_002D60D3_002D4668_002D9E40_002DE49A8FBF8BC0_002Fd_003AMigrations/@EntryIndexedValue">ExplicitlyExcluded</s:String>
3+
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES/@EntryValue">False</s:Boolean>
34
<s:String x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=8929152D75F88149BA91E0ED1FDC8ACF/AbsolutePath/@EntryValue">F:\repositories\git\kontur.store\Common.DotSettings</s:String>
45
<s:String x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=8929152D75F88149BA91E0ED1FDC8ACF/RelativePath/@EntryValue">..\Common.DotSettings</s:String>
56
<s:Boolean x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=8929152D75F88149BA91E0ED1FDC8ACF/@KeyIndexDefined">True</s:Boolean>
67
<s:Boolean x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=File8929152D75F88149BA91E0ED1FDC8ACF/@KeyIndexDefined">True</s:Boolean>
78
<s:Double x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=File8929152D75F88149BA91E0ED1FDC8ACF/RelativePriority/@EntryValue">1</s:Double>
9+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
10+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
11+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
12+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
813
<s:Boolean x:Key="/Default/UserDictionary/Words/=grobo/@EntryIndexedValue">True</s:Boolean>
914
<s:Boolean x:Key="/Default/UserDictionary/Words/=Keyspace/@EntryIndexedValue">True</s:Boolean>
1015
<s:Boolean x:Key="/Default/UserDictionary/Words/=Kontur/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
</PropertyGroup>
2020

2121
<ItemGroup>
22-
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="All" />
23-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
22+
<PackageReference Include="Nerdbank.GitVersioning" Version="3.4.244" PrivateAssets="All" />
23+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
2424
</ItemGroup>
2525

2626
</Project>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ yarn build:types
4141
dotnet ef database update --project ./DbViewer.TestApi/DbViewer.TestApi.csproj --no-build --configuration Release
4242
4343
# start db-viewer
44-
./DbViewer.TestApi/bin/net5.0/SkbKontur.DbViewer.TestApi.exe
44+
./DbViewer.TestApi/bin/net6.0/SkbKontur.DbViewer.TestApi.exe
4545
yarn start:prod
4646
4747
# start tests

0 commit comments

Comments
 (0)