Skip to content

Commit 1fbaf90

Browse files
author
Vytautas Kasparavičius
committed
Moved to Visual Studio 2017, fixed #63 (#63).
1 parent b6b09ac commit 1fbaf90

12 files changed

+291
-332
lines changed

Hangfire.PostgreSql.sln

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26228.4
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{766BE831-F758-46BC-AFD3-BBEEFE0F686F}"
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5CA38188-92EE-453C-A04E-A506DF15A787}"
99
EndProject
10-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Hangfire.PostgreSql", "src\Hangfire.PostgreSql\Hangfire.PostgreSql.xproj", "{3E4DBC41-F38E-4D1C-A6A7-206A132A29D6}"
11-
EndProject
1210
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0D30A51B-814F-474E-93B8-44E9C155255C}"
1311
EndProject
14-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Hangfire.PostgreSql.Tests", "tests\Hangfire.PostgreSql.Tests\Hangfire.PostgreSql.Tests.xproj", "{6044A48D-730B-4D1F-B03A-EB2B458DAF53}"
12+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hangfire.PostgreSql", "src\Hangfire.PostgreSql\Hangfire.PostgreSql.csproj", "{3E4DBC41-F38E-4D1C-A6A7-206A132A29D6}"
13+
EndProject
14+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hangfire.PostgreSql.Tests", "tests\Hangfire.PostgreSql.Tests\Hangfire.PostgreSql.Tests.csproj", "{6044A48D-730B-4D1F-B03A-EB2B458DAF53}"
1515
EndProject
1616
Global
1717
GlobalSection(SolutionConfigurationPlatforms) = preSolution

build.cake

+7-9
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ var target = Argument("target", "Default");
1212

1313
IEnumerable<string> GetFrameworks(string path)
1414
{
15-
var projectJObject = DeserializeJsonFromFile<JObject>(path);
16-
foreach(var prop in ((JObject)projectJObject["frameworks"]).Properties())
17-
{
18-
yield return prop.Name;
19-
}
15+
return new string[] { "netstandard1.4", "net451" };
2016
}
2117

2218
//////////////////////////////////////////////////////////////////////
@@ -26,7 +22,7 @@ IEnumerable<string> GetFrameworks(string path)
2622
Task("Restore")
2723
.Does(() =>
2824
{
29-
DotNetCoreRestore("src/\" \"tests/");
25+
DotNetCoreRestore();
3026
});
3127

3228
Task("Build")
@@ -38,9 +34,11 @@ Task("Build")
3834
Configuration = "Release"
3935
};
4036

41-
var projects = GetFiles("./src/**/project.json");
37+
var projects = GetFiles("./src/**/*.csproj");
4238
foreach(var project in projects)
4339
{
40+
Information("Found project: {0}", project);
41+
4442
foreach(var framework in GetFrameworks(project.ToString()))
4543
{
4644
if (!IsRunningOnWindows() && !framework.StartsWith("netstandard"))
@@ -58,7 +56,7 @@ Task("Test")
5856
.IsDependentOn("Build")
5957
.Does(() =>
6058
{
61-
var files = GetFiles("tests/**/project.json");
59+
var files = GetFiles("tests/**/*.csproj");
6260
foreach(var file in files)
6361
{
6462
DotNetCoreTest(file.ToString());
@@ -76,7 +74,7 @@ Task("Pack")
7674
NoBuild = true
7775
};
7876

79-
var files = GetFiles("src/**/project.json");
77+
var files = GetFiles("src/**/*.csproj");
8078
foreach(var file in files)
8179
{
8280
DotNetCorePack(file.ToString(), settings);

global.json

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<Description>PostgreSql storage implementation for Hangfire (background job system for ASP.NET applications).</Description>
5+
<Copyright>Copyright © 2014-2017 Frank Hommers and others</Copyright>
6+
<AssemblyTitle>Hangfire PostgreSql Storage</AssemblyTitle>
7+
<VersionPrefix>1.4.6</VersionPrefix>
8+
<Authors>Frank Hommers and others (Burhan Irmikci (barhun), Zachary Sims(zsims), kgamecarter, Stafford Williams (staff0rd), briangweber, Viktor Svyatokha (ahydrax), Christopher Dresel (Dresel), Ben Herila (bherila), Vytautas Kasparavičius (vytautask)</Authors>
9+
<TargetFrameworks>netstandard1.4;net451</TargetFrameworks>
10+
<AssemblyName>Hangfire.PostgreSql</AssemblyName>
11+
<OutputType>Library</OutputType>
12+
<PackageId>Hangfire.PostgreSql</PackageId>
13+
<PackageTags>Hangfire;PostgreSql;Postgres</PackageTags>
14+
<PackageReleaseNotes>https://github.com/frankhommers/Hangfire.PostgreSql/releases</PackageReleaseNotes>
15+
<PackageProjectUrl>http://hmm.rs/Hangfire.PostgreSql</PackageProjectUrl>
16+
<PackageLicenseUrl>https://raw.github.com/frankhommers/Hangfire.PostgreSql/master/LICENSE.md</PackageLicenseUrl>
17+
<Version>1.4.7</Version>
18+
</PropertyGroup>
19+
20+
<ItemGroup>
21+
<EmbeddedResource Include="*.sql" Exclude="bin\**;obj\**;**\*.xproj;packages\**;@(EmbeddedResource)" />
22+
</ItemGroup>
23+
24+
<ItemGroup>
25+
<PackageReference Include="Dapper" Version="1.50.2" />
26+
<PackageReference Include="Hangfire.Core" Version="1.6.10" />
27+
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
28+
<PackageReference Include="Npgsql" Version="3.2.1" />
29+
</ItemGroup>
30+
31+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
32+
<DefineConstants>$(DefineConstants);NETCORE1</DefineConstants>
33+
</PropertyGroup>
34+
35+
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
36+
<Reference Include="System.Configuration" />
37+
<Reference Include="System" />
38+
<Reference Include="Microsoft.CSharp" />
39+
</ItemGroup>
40+
41+
</Project>

src/Hangfire.PostgreSql/Hangfire.PostgreSql.xproj

-21
This file was deleted.

src/Hangfire.PostgreSql/PostgreSqlJobQueueMonitoringApi.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ internal class PostgreSqlJobQueueMonitoringApi : IPersistentJobQueueMonitoringAp
3434

3535
public PostgreSqlJobQueueMonitoringApi(IDbConnection connection, PostgreSqlStorageOptions options)
3636
{
37-
if (connection == null) throw new ArgumentNullException("connection");
38-
if (options == null) throw new ArgumentNullException("options");
37+
if (connection == null) throw new ArgumentNullException(nameof(connection));
38+
if (options == null) throw new ArgumentNullException(nameof(options));
3939

4040
_connection = connection;
4141
_options = options;

src/Hangfire.PostgreSql/PostgreSqlMonitoringApi.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public PostgreSqlMonitoringApi(
4444
PostgreSqlStorageOptions options,
4545
PersistentJobQueueProviderCollection queueProviders)
4646
{
47-
if(options==null) throw new ArgumentNullException("options");
47+
if(options==null) throw new ArgumentNullException(nameof(options));
4848

4949
_connectionString = connectionString;
5050
_queueProviders = queueProviders;

0 commit comments

Comments
 (0)