Skip to content

Commit

Permalink
DapperQueryBuilder 1.2.7 - now targeted at net461;netstandard2.0;net5…
Browse files Browse the repository at this point in the history
….0; New DapperQueryBuilder.StrongName (same package but with strong name signing)
  • Loading branch information
Drizin committed Jul 30, 2022
1 parent 3a76a13 commit fd9b343
Show file tree
Hide file tree
Showing 9 changed files with 154 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,5 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
/src/DapperQueryBuilder/DapperQueryBuilder.xml
/src/DapperQueryBuilder.StrongName/DapperQueryBuilder.StrongName.xml
/src/release.snk
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[![Nuget](https://img.shields.io/nuget/v/Dapper-QueryBuilder?label=Dapper-QueryBuilder)](https://www.nuget.org/packages/Dapper-QueryBuilder)
[![Downloads](https://img.shields.io/nuget/dt/Dapper-QueryBuilder.svg)](https://www.nuget.org/packages/Dapper-QueryBuilder)
[![Nuget](https://img.shields.io/nuget/v/DapperQueryBuilder.StrongName?label=DapperQueryBuilder.StrongName)](https://www.nuget.org/packages/DapperQueryBuilder.StrongName)
[![Downloads](https://img.shields.io/nuget/dt/DapperQueryBuilder.StrongName.svg)](https://www.nuget.org/packages/DapperQueryBuilder.StrongName)

# Dapper Query Builder

Expand Down Expand Up @@ -91,7 +93,7 @@ Our classes (`QueryBuilder` and `CommandBuilder`) wrap the SQL statement and the

# Quickstart / NuGet Package

1. Install the [NuGet package Dapper-QueryBuilder](https://www.nuget.org/packages/Dapper-QueryBuilder) (don't forget the dash to get the right package!)
1. Install the [NuGet package Dapper-QueryBuilder](https://www.nuget.org/packages/Dapper-QueryBuilder) (don't forget the dash to get the right package!) or [NuGet package DapperQueryBuilder.StrongName](https://www.nuget.org/packages/DapperQueryBuilder.StrongName)
1. Start using like this:
```cs
using DapperQueryBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net461;netstandard2.0;net5.0</TargetFrameworks>
<Authors>Rick Drizin</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/Drizin/DapperQueryBuilder/</PackageProjectUrl>
<Description>Dapper Query Builder using Fluent API and String Interpolation</Description>
<Copyright>Rick Drizin</Copyright>
<Company>Rick Drizin</Company>
<Version>1.2.7</Version>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Title>DapperQueryBuilder (Strong Named)</Title>
<PackageId>DapperQueryBuilder.StrongName</PackageId>
<DocumentationFile>DapperQueryBuilder.StrongName.xml</DocumentationFile>
<PackageTags>dapper;query-builder;query builder;dapperquerybuilder;dapper-query-builder;dapper-interpolation;dapper-interpolated-string</PackageTags>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- Include symbol files (*.pdb) in the main .nupkg -->
<PackageReadmeFile>NuGetReadMe.md</PackageReadmeFile>
<AssemblyName>DapperQueryBuilder.StrongName</AssemblyName>
</PropertyGroup>

<ItemGroup>
<None Include="..\DapperQueryBuilder\NuGetReadMe.md" Pack="true" PackagePath="\" />
<PackageReference Include="Dapper.StrongName" Version="2.0.123" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<Choose>
<When Condition="'$(Configuration)' == 'Debug'">
<PropertyGroup>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\debug.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\release.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
</Otherwise>
</Choose>

<ItemGroup>
<Folder Include="Properties\" />
<Compile Include="..\DapperQueryBuilder\**\*.cs" Exclude="..\DapperQueryBuilder\obj\**\*.cs" />
</ItemGroup>


</Project>

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>DapperQueryBuilder.StrongName</id>
<title>DapperQueryBuilder (Strong Named)</title>
<authors>Rick Drizin</authors>
<owners>Rick Drizin</owners>
<license type="expression">MIT</license>
<projectUrl>https://github.com/Drizin/DapperQueryBuilder</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>DapperQueryBuilder: Dapper Query Builder using String Interpolation and Fluent API</description>
<copyright>Copyright Rick Drizin 2020</copyright>
<dependencies>
</dependencies>
</metadata>
<files>
<file src="bin\$configuration$\DapperQueryBuilder.StrongName.*" target="lib\net472" />
<file src="bin\$configuration$\DapperQueryBuilder.StrongName.*" target="lib\netstandard2.0" />
</files>
</package>
2 changes: 1 addition & 1 deletion src/DapperQueryBuilder/Dapper-QueryBuilder.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Dapper-QueryBuilder</id>
<title>Dapper.QueryBuilder</title>
<title>DapperQueryBuilder</title>
<authors>Rick Drizin</authors>
<owners>Rick Drizin</owners>
<license type="expression">MIT</license>
Expand Down
19 changes: 16 additions & 3 deletions src/DapperQueryBuilder/DapperQueryBuilder.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net472</TargetFrameworks>
<TargetFrameworks>net461;netstandard2.0;net5.0</TargetFrameworks>
<Authors>Rick Drizin</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/Drizin/DapperQueryBuilder/</PackageProjectUrl>
<Description>Dapper Query Builder using Fluent API and String Interpolation</Description>
<Copyright>Rick Drizin</Copyright>
<Company>Rick Drizin</Company>
<Version>1.2.6</Version>
<Version>1.2.7</Version>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Title>DapperQueryBuilder</Title>
<PackageId>Dapper-QueryBuilder</PackageId>
<DocumentationFile>DapperQueryBuilder.xml</DocumentationFile>
<PackageTags>dapper;query-builder;query builder;dapperquerybuilder;dapper-query-builder;dapper-interpolation;dapper-interpolated-string</PackageTags>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- Include symbol files (*.pdb) in the main .nupkg -->
<PackageReadmeFile>NuGetReadMe.md</PackageReadmeFile>

<AssemblyName>DapperQueryBuilder</AssemblyName>
</PropertyGroup>

<ItemGroup>
Expand All @@ -30,4 +31,16 @@
</PackageReference>
</ItemGroup>

<Choose>
<When Condition="'$(Configuration)' == 'Debug'">
<ItemGroup>
<InternalsVisibleTo Include="DapperQueryBuilder.Tests" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<InternalsVisibleTo Include="DapperQueryBuilder.Tests" />
</ItemGroup>
</Otherwise>
</Choose>
</Project>
13 changes: 0 additions & 13 deletions src/build-release.cmd

This file was deleted.

56 changes: 56 additions & 0 deletions src/build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
$msbuild = (
"$Env:programfiles (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\msbuild.exe",
"$Env:programfiles (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild.exe",
"$Env:programfiles (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe",
"$Env:programfiles (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\msbuild.exe",
"$Env:programfiles\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\msbuild.exe",
"$Env:programfiles (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe",
"${Env:ProgramFiles(x86)}\MSBuild\14.0\Bin\MSBuild.exe",
"${Env:ProgramFiles(x86)}\MSBuild\12.0\Bin\MSBuild.exe"
) | Where-Object { Test-Path $_ } | Select-Object -first 1

$configuration = 'Release'

Remove-Item -Recurse -Force -ErrorAction Ignore ".\packages-local"
Remove-Item -Recurse -Force -ErrorAction Ignore "$env:HOMEDRIVE$env:HOMEPATH\.nuget\packages\dapper-querybuilder"
Remove-Item -Recurse -Force -ErrorAction Ignore "$env:HOMEDRIVE$env:HOMEPATH\.nuget\packages\dapperquerybuilder.strongname"

New-Item -ItemType Directory -Force -Path ".\packages-local"

dotnet clean DapperQueryBuilder.sln
dotnet clean DapperQueryBuilder\DapperQueryBuilder.csproj
dotnet clean DapperQueryBuilder.StrongName\DapperQueryBuilder.StrongName.csproj

# DapperQueryBuilder + nupkg/snupkg (dotnet build is the best at restoring packages; but for deterministic builds we need msbuild)
dotnet build -c release DapperQueryBuilder\DapperQueryBuilder.csproj
& $msbuild "DapperQueryBuilder\DapperQueryBuilder.csproj" `
/t:Pack `
/p:PackageOutputPath="..\packages-local\" `
'/p:targetFrameworks="net461;netstandard2.0;net5.0"' `
/p:Configuration=$configuration `
/p:IncludeSymbols=true `
/p:SymbolPackageFormat=snupkg `
/verbosity:minimal `
/p:ContinuousIntegrationBuild=true

# DapperQueryBuilder.StrongName + nupkg/snupkg (dotnet build is the best at restoring packages; but for deterministic builds we need msbuild)
dotnet build -c release DapperQueryBuilder.StrongName\DapperQueryBuilder.StrongName.csproj
& $msbuild "DapperQueryBuilder.StrongName\DapperQueryBuilder.StrongName.csproj" `
/t:Pack `
/p:PackageOutputPath="..\packages-local\" `
'/p:targetFrameworks="net461;netstandard2.0;net5.0"' `
/p:Configuration=$configuration `
/p:IncludeSymbols=true `
/p:SymbolPackageFormat=snupkg `
/verbosity:minimal `
/p:ContinuousIntegrationBuild=true




# Unit tests
if ($configuration -eq "Debug")
{
dotnet build -c release DapperQueryBuilder.Tests\DapperQueryBuilder.Tests.csproj
dotnet test DapperQueryBuilder.Tests\DapperQueryBuilder.Tests.csproj
}
Binary file added src/debug.snk
Binary file not shown.

0 comments on commit fd9b343

Please sign in to comment.