Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update frameworks #455

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
ARG VERSION

LABEL maintainer="[email protected]"
Expand Down Expand Up @@ -31,9 +31,9 @@ RUN ./build/Extract-Resource.ps1 -File "$(find ~/.nuget/packages/mysql.data/ -na

COPY . ./

RUN dotnet publish -v q -nologo --no-restore product/roundhouse.console -o /app/out -p:TargetFramework=netcoreapp3.1 -p:Version="${VERSION}" -p:Configuration=Build -p:Platform="Any CPU"
RUN dotnet publish -v q -nologo --no-restore product/roundhouse.console -o /app/out -p:TargetFramework=net6.0 -p:Version="${VERSION}" -p:Configuration=Build -p:Platform="Any CPU"

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
FROM mcr.microsoft.com/dotnet/aspnet:6.0

WORKDIR /app
COPY --from=build-env /app/out .
Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ msbuild /t:"Build" /p:DropFolder=$CODEDROP /p:Version="$($gitVersion.FullSemVer)
dotnet pack -nologo --no-build -v q -p:Version="$($gitVersion.FullSemVer)" -p:NoPackageAnalysis=true -p:Configuration=Build -p:Platform="Any CPU" -o ${PACKAGEDIR}


" - net461 command-line nuget package"
" - net462 command-line nuget package"

nuget pack product/roundhouse.console/roundhouse.nuspec -OutputDirectory "$CODEDROP/packages" -Verbosity quiet -NoPackageAnalysis -Version "$($gitVersion.FullSemVer)"
msbuild /t:"Pack" product/roundhouse.tasks/roundhouse.tasks.csproj /p:DropFolder=$CODEDROP /p:Version="$($gitVersion.FullSemVer)" /p:NoPackageAnalysis=true /nologo /v:q /fl /flp:"LogFile=$LOGDIR/msbuild.roundhouse.tasks.pack.log;Verbosity=n" /p:Configuration=Build /p:Platform="Any CPU"
Expand Down
20 changes: 11 additions & 9 deletions product/roundhouse.console/roundhouse.console.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks Condition="'$(TargetFramework)' == ''">netcoreapp3.1;net461</TargetFrameworks>
<TargetFramework Condition="'$(TargetFramework)' == ''">net461</TargetFramework>
<TargetFrameworks Condition="'$(TargetFramework)' == ''">net6.0;net472</TargetFrameworks>
<TargetFramework Condition="'$(TargetFramework)' == ''">net472</TargetFramework>
<CLSCompliant>true</CLSCompliant>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand All @@ -16,13 +16,15 @@
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Version Condition="'$(Version)' == ''">1.0.0</Version>
<NugetVersion Condition="'$(NugetVersion)' == ''">$(Version)</NugetVersion>
<!-- https://stackoverflow.com/questions/69919664/publish-error-found-multiple-publish-output-files-with-the-same-relative-path -->
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
<NuspecFile>roundhouse.tool.nuspec</NuspecFile>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
<PropertyGroup Condition="'$(TargetFramework)' == 'net472'">
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
</PropertyGroup>

Expand Down Expand Up @@ -53,7 +55,7 @@
<PackageReference Include="System.Data.SqlClient" Version="4.8.2" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<PackageReference Include="Costura.Fody" Version="3.3.2" />
<PackageReference Include="Fody" Version="3.3.5">
<PrivateAssets>all</PrivateAssets>
Expand All @@ -66,7 +68,7 @@
</ItemGroup>


<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<ProjectReference Include="..\roundhouse.databases.access\roundhouse.databases.access.csproj" />
<ProjectReference Include="..\roundhouse.databases.oracle\roundhouse.databases.oracle.csproj" />
</ItemGroup>
Expand All @@ -90,20 +92,20 @@
</EmbeddedResource>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<None Include="rh" CopyToOutputDirectory="PreserveNewest" />
<None Include="rh.bat" CopyToOutputDirectory="PreserveNewest" />
<None Include="DotnetToolSettings.xml" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>


<!-- Nuspec properties (for generating NuGet package) -->
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
<PropertyGroup Condition="'$(TargetFramework)' == 'net472'">
<NuspecFile>roundhouse.nuspec</NuspecFile>
<NuspecProperties>mergedExe=$(CopyDestination);version=$(NugetVersion)</NuspecProperties>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
<NuspecFile>roundhouse.tool.nuspec</NuspecFile>
<NuspecProperties>version=$(NugetVersion)</NuspecProperties>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion product/roundhouse.console/roundhouse.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<iconUrl>https://raw.github.com/chucknorris/roundhouse/master/nuget/RoundhousE_Logo.NuGet.jpg</iconUrl>
</metadata>
<files>
<file src="bin\net461\win7-x86\rh.exe" target="tools\" />
<file src="bin\net472\win7-x86\rh.exe" target="tools\" />
<file src="..\..\docs\legal\*" target="tools\" />
</files>
</package>
4 changes: 2 additions & 2 deletions product/roundhouse.console/roundhouse.tool.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
<packageType name="DotnetTool" />
</packageTypes>
<dependencies>
<group targetFramework=".netcoreapp3.1" />
<group targetFramework=".net6.0" />
</dependencies>
<icon>images/RoundhousE_Logo.NuGet.jpg</icon>
</metadata>
<files>
<file src="bin/netcoreapp3.1/publish/**/**" target="tools/netcoreapp3.1/any" />
<file src="bin/net6.0/publish/**/**" target="tools/net6.0/any" />
<file src="../../nuget/RoundhousE_Logo.NuGet.jpg" target="images/" />
</files>
</package>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net472</TargetFramework>
<CLSCompliant>true</CLSCompliant>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ This is the MySql database package.
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<None Include="../../nuget/RoundhousE_Logo.NuGet.jpg" Pack="true" PackagePath="/images"/>
<None Include="../../nuget/RoundhousE_Logo.NuGet.jpg" Pack="true" PackagePath="/images" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Mysql.Data" Version="8.0.16" />
<PackageReference Include="Mysql.Data" Version="8.0.31" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.5.0" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net472</TargetFramework>
<CLSCompliant>true</CLSCompliant>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down
6 changes: 3 additions & 3 deletions product/roundhouse.lib/roundhouse.lib.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<CLSCompliant>true</CLSCompliant>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -55,7 +55,7 @@ This is an "include all" package that gives you all the databases. If you want o
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<ProjectReference Include="..\roundhouse.databases.oracle\roundhouse.databases.oracle.csproj" />
<ProjectReference Include="..\roundhouse.databases.access\roundhouse.databases.access.csproj" />
</ItemGroup>
Expand All @@ -69,7 +69,7 @@ This is an "include all" package that gives you all the databases. If you want o
<ProjectReference Include="..\roundhouse.core\roundhouse.core.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
Expand Down
2 changes: 1 addition & 1 deletion product/roundhouse.lib/roundhouse.lib.nuspecZ
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<iconUrl>https://raw.github.com/chucknorris/roundhouse/master/nuget/RoundhousE_Logo.NuGet.jpg</iconUrl>
</metadata>
<files>
<file src="$mergedDll$" target="lib/net461" />
<file src="$mergedDll$" target="lib/net472" />
<file src="bin\$configuration$\netstandard2.0\*.dll"
exclude="bin\$configuration$\netstandard2.0\$AssemblyName$.dll"
target="lib/netstandard2.0" />
Expand Down
2 changes: 1 addition & 1 deletion product/roundhouse.tasks/roundhouse.tasks.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net472</TargetFramework>
<CLSCompliant>true</CLSCompliant>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down
6 changes: 3 additions & 3 deletions product/roundhouse.test.merged/roundhouse.test.merged.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!--<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>-->
<TargetFramework>net461</TargetFramework>
<!--<TargetFrameworks>net6.0;net472</TargetFrameworks>-->
<TargetFramework>net472</TargetFramework>
<CLSCompliant>true</CLSCompliant>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<OutputType>Library</OutputType>
Expand Down Expand Up @@ -30,7 +30,7 @@
<PackageReference Include="System.Data.SQLite" Version="1.0.110" />
<PackageReference Include="TinySpec.NUnit" Version="0.9.5" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<Reference Include="System.Data.OracleClient" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net472</TargetFramework>
<CLSCompliant>true</CLSCompliant>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down
10 changes: 5 additions & 5 deletions product/roundhouse.tests/databases/DbProviderFactories.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace roundhouse.tests.databases
using roundhouse.databases.sqlserver;
using roundhouse.databases.sqlserverce;
using roundhouse.databases.mysql;
#if NET461
#if net472
using roundhouse.databases.oracle;
using roundhouse.databases.access;
#endif
Expand All @@ -35,7 +35,7 @@ public class TestableMySqlDatabase : MySqlDatabase, ITestableDatabase
public DbProviderFactory factory => get_db_provider_factory();
}

#if NET461
#if net472
public class TestableOracleDatabase : OracleDatabase, ITestableDatabase
{
public DbProviderFactory factory => get_db_provider_factory();
Expand Down Expand Up @@ -131,7 +131,7 @@ public void has_mysql_provider_factory()
}
}

#if NET461
#if net472
[Concern(typeof(TestableOracleDatabase))]
public class concern_for_OracleDatabase : concern_for_Database<TestableOracleDatabase>
{
Expand All @@ -144,7 +144,7 @@ public void has_oracle_provider_factory()
}
#endif

#if (NET461 && _WINDOWS)
#if (net472 && _WINDOWS)
[Concern(typeof(TestableAccessDatabase))]
public class concern_for_AccessDatabase : concern_for_Database<TestableAccessDatabase>
{
Expand Down Expand Up @@ -198,7 +198,7 @@ public void has_sqlite_provider_factory()
}
}

#if NET461
#if net472
[Concern(typeof(TestableSqlServerCEDatabase))]
public class concern_for_SqlServerCEDatabase : concern_for_Database<TestableSqlServerCEDatabase>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void utf8_encoded_file_without_bom_should_read_correctly()
}
}

#if NET461
#if net472
[Concern(typeof(DotNetFileSystemAccess))]
public class when_reading_files_with_different_formats_with_ansi_encoding_configuration : concern_for_file_system
{
Expand Down
9 changes: 4 additions & 5 deletions product/roundhouse.tests/roundhouse.tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
<TargetFrameworks>net6.0;net472</TargetFrameworks>
<CLSCompliant>true</CLSCompliant>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<OutputType>Library</OutputType>
Expand All @@ -20,10 +20,9 @@
<ItemGroup>
<PackageReference Include="log4net" Version="2.0.10" />
<PackageReference Include="Castle.Core" Version="4.4.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.SqlServer.Compact" Version="4.0.8876.1" />
<PackageReference Include="Moq" Version="4.11.0" />
<PackageReference Include="MySql.Data" Version="8.0.16" />
<PackageReference Include="MySql.Data" Version="8.0.31" />
<PackageReference Include="Npgsql" Version="4.0.7" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit.ConsoleRunner" Version="3.10.0" />
Expand All @@ -35,10 +34,10 @@
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.2" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<Reference Include="System.Data.OracleClient" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
<ProjectReference Include="..\roundhouse.databases.oracle\roundhouse.databases.oracle.csproj" />
<ProjectReference Include="..\roundhouse.databases.access\roundhouse.databases.access.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace roundhouse.tests.sqlsplitters
using System.Text.RegularExpressions;

using roundhouse.databases;
#if NET461
#if net472
using roundhouse.databases.access;
using roundhouse.databases.oracle;
#endif
Expand All @@ -26,7 +26,7 @@ public override void Context()
Database database = new SqlServerDatabase();
tsql_separator_regex_string = database.sql_statement_separator_regex_pattern;

#if NET461
#if net472
access_sql_separator_regex_string = AccessDatabase.default_sql_statement_separator_regex_pattern;
plsql_separator_regex_string = OracleDatabase.default_sql_statement_separator_regex_pattern;
#endif
Expand Down Expand Up @@ -586,7 +586,7 @@ public void should_not_replace_on_go_inside_of_comments_with_symbols_after_on_di

}

#if NET461
#if net472
[Concern(typeof(StatementSplitter))]
public class when_replacing_plsql_statements_with_the_statement_splitters_match_evaluator : concern_for_StatementSplitter
{
Expand Down