Skip to content

Commit

Permalink
Update to dotnet core build.
Browse files Browse the repository at this point in the history
  • Loading branch information
ngbrown committed Jun 7, 2020
1 parent 38b1c81 commit cc71a58
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 271 deletions.
12 changes: 5 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 1.2.0.{build}
image: Visual Studio 2015
version: 1.3.0.{build}
image: Visual Studio 2019
configuration: Release
platform: Any CPU
assembly_info:
Expand All @@ -8,21 +8,19 @@ assembly_info:
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}-{branch}'
cache: src\packages -> **\packages.config
before_build:
- cmd: appveyor-retry nuget restore .\src\NHibernate.PersistenceTesting.sln
cache: '%USERPROFILE%\.nuget\packages -> **\*.csproj'
build:
project: .\src\NHibernate.PersistenceTesting.sln
verbosity: minimal
after_build:
- ps: >-
if (${env:APPVEYOR_REPO_TAG} -eq $true) {
$semver = ${env:APPVEYOR_BUILD_VERSION}
$semver = ${env:APPVEYOR_REPO_TAG}
} else {
$semver = ${env:APPVEYOR_BUILD_VERSION} -ireplace '(\d+.\d+.\d+).(\d+)', "`$1-ci-`$2-${env:APPVEYOR_REPO_BRANCH}"
$semver = $semver.Substring(0, [System.Math]::Min(20, $semver.Length))
}
nuget pack .\src\NHibernate.PersistenceTesting\NHibernate.PersistenceTesting.csproj -properties "Configuration=${env:CONFIGURATION};Platform=AnyCPU" -symbols -version $semver
dotnet pack .\src\NHibernate.PersistenceTesting\NHibernate.PersistenceTesting.csproj --configuration "${env:CONFIGURATION}" --include-symbols "-p:PackageVersion=${semver}"
artifacts:
- path: '*.nupkg'
deploy:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,79 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6D4C7256-E8B1-402C-B8B0-4B7AED36FB55}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NHibernate.PersistenceTesting</RootNamespace>
<AssemblyName>NHibernate.PersistenceTesting</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<TargetFrameworks>netstandard2.0;net40;netcoreapp2.0</TargetFrameworks>
<PackageLicenseExpression>BSD-3-Clause</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/ngbrown/NHibernate.PersistanceTesting</PackageProjectUrl>
<Copyright>Copyright 2017-2020 Nathan Brown and contributors. Copyright 2008-2015 James Gregory and contributors.</Copyright>
<PackageTags>NHibernate testing tdd</PackageTags>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Description>Quickly test your NHibernate mappings using the PersistenceSpecification class</Description>
<Company>https://github.com/ngbrown/NHibernate.PersistanceTesting</Company>
<Authors>Nathan Brown, James Gregory, and contributors</Authors>
<RepositoryUrl>https://github.com/ngbrown/NHibernate.PersistanceTesting</RepositoryUrl>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Iesi.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
<HintPath>..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NHibernate, Version=4.0.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
<HintPath>..\packages\NHibernate.4.0.0.4000\lib\net40\NHibernate.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<Compile Include="DateTimeEqualityComparer.cs" />
<Compile Include="DateTimeOffsetEqualityComparer.cs" />
<Compile Include="MissingConstructorException.cs" />
<Compile Include="PersistenceSpecification.cs" />
<Compile Include="PersistenceSpecificationExtensions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Utils\Accessor.cs" />
<Compile Include="Utils\Extensions.cs" />
<Compile Include="Utils\Member.cs" />
<Compile Include="Utils\PropertyChain.cs" />
<Compile Include="Utils\ReflectionHelper.cs" />
<Compile Include="Utils\SingleMember.cs" />
<Compile Include="Values\List.cs" />
<Compile Include="Values\Property.cs" />
<Compile Include="Values\ReferenceBag.cs" />
<Compile Include="Values\ReferenceList.cs" />
<Compile Include="Values\ReferenceProperty.cs" />

<ItemGroup Condition="'$(TargetFramework)' != 'net40'">
<PackageReference Include="NHibernate" Version="[5.1.0, 6.0.0)" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config">
<SubType>Designer</SubType>
</None>

<ItemGroup Condition="'$(TargetFramework)' == 'net40'">
<PackageReference Include="NHibernate" Version="[4.0.0.4000, 6.0.0)" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

</Project>
36 changes: 0 additions & 36 deletions src/NHibernate.PersistenceTesting/Properties/AssemblyInfo.cs

This file was deleted.

5 changes: 0 additions & 5 deletions src/NHibernate.PersistenceTesting/packages.config

This file was deleted.

6 changes: 4 additions & 2 deletions src/Tests/DomainModel/DateTimeOffsetISO8601StringType.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System;
using System.Data;
using System.Data.Common;
using System.Globalization;
using NHibernate.Engine;
using NHibernate.SqlTypes;
using NHibernate.Type;

Expand All @@ -23,14 +25,14 @@ public override SqlType SqlType
get { return SqlTypeFactory.GetAnsiString(35); }
}

public override void Set(IDbCommand st, object value, int index)
public override void Set(DbCommand st, object value, int index, ISessionImplementor session)
{
var dateTimeOffset = (DateTimeOffset)value;
// purpously shortened to simulate saving to a server that supports DateTimeOffset, but not to the full resolution.
((IDataParameter)st.Parameters[index]).Value = dateTimeOffset.ToString(DateTimeOffsetStringFormat, CultureInfo.InvariantCulture);
}

public override object Get(IDataReader rs, int index)
public override object Get(DbDataReader rs, int index, ISessionImplementor session)
{
try
{
Expand Down
36 changes: 0 additions & 36 deletions src/Tests/Properties/AssemblyInfo.cs

This file was deleted.

120 changes: 18 additions & 102 deletions src/Tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,108 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{97949C61-3EA0-4BD7-9432-F9BC47B699AA}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Tests</RootNamespace>
<AssemblyName>Tests</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFramework>netcoreapp2.1</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="FakeItEasy, Version=3.4.2.0, Culture=neutral, PublicKeyToken=eff28e2146d5fd2c, processorArchitecture=MSIL">
<HintPath>..\packages\FakeItEasy.3.4.2\lib\net40\FakeItEasy.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NHibernate, Version=4.0.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
<HintPath>..\packages\NHibernate.4.0.0.4000\lib\net40\NHibernate.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=3.7.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.7.1\lib\net40\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.105.2, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Core.1.0.105.2\lib\net40\System.Data.SQLite.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DomainModel\ConnectedTester.cs" />
<Compile Include="DomainModel\DateTimeOffsetISO8601StringType.cs" />
<Compile Include="DomainModel\Entity.cs" />
<Compile Include="SingleConnectionSessionSourceForSQLiteInMemoryTesting.cs" />
<Compile Include="Testing\EqualityComparerSpecs.cs" />
<Compile Include="Testing\PersistenceSpecificationExtensionsSpecs.cs" />
<Compile Include="Testing\PersistenceSpecificationTester.cs" />
<Compile Include="Testing\PersistenceSpecificationTransactionTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Specification.cs" />
<Compile Include="SpecificationExtensions.cs" />
<Compile Include="Testing\SessionSourceConfigurationTester.cs" />
<Compile Include="Testing\Values\Entities.cs" />
<Compile Include="Testing\Values\ListSpecs.cs" />
<Compile Include="Testing\Values\PropertySpecs.cs" />
<Compile Include="Testing\Values\ReferenceBagSpec.cs" />
<Compile Include="Testing\Values\ReferenceListSpecs.cs" />
<Compile Include="Testing\Values\ReferencePropertySpecs.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\NHibernate.PersistenceTesting\NHibernate.PersistenceTesting.csproj">
<Project>{6d4c7256-e8b1-402c-b8b0-4b7aed36fb55}</Project>
<Name>NHibernate.PersistenceTesting</Name>
</ProjectReference>
<PackageReference Include="FakeItEasy" Version="5.5.0" />
<PackageReference Include="FakeItEasy.Analyzer.CSharp" Version="5.3.0" />
<PackageReference Include="NHibernate" Version="5.1.0" />
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.113.1" />
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
</ItemGroup>

<ItemGroup>
<Analyzer Include="..\packages\FakeItEasy.Analyzer.3.4.2\analyzers\dotnet\cs\FakeItEasy.Analyzer.CSharp.dll" />
<ProjectReference Include="..\NHibernate.PersistenceTesting\NHibernate.PersistenceTesting.csproj" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\System.Data.SQLite.Core.1.0.105.2\build\net40\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.105.2\build\net40\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.105.2\build\net40\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.105.2\build\net40\System.Data.SQLite.Core.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

</Project>
8 changes: 0 additions & 8 deletions src/Tests/packages.config

This file was deleted.

0 comments on commit cc71a58

Please sign in to comment.