Skip to content

Commit

Permalink
Moved to Visual Studio 2017, fixed #63 (#63).
Browse files Browse the repository at this point in the history
  • Loading branch information
Vytautas Kasparavičius committed Mar 14, 2017
1 parent b6b09ac commit 1fbaf90
Show file tree
Hide file tree
Showing 12 changed files with 291 additions and 332 deletions.
10 changes: 5 additions & 5 deletions Hangfire.PostgreSql.sln
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{766BE831-F758-46BC-AFD3-BBEEFE0F686F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5CA38188-92EE-453C-A04E-A506DF15A787}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Hangfire.PostgreSql", "src\Hangfire.PostgreSql\Hangfire.PostgreSql.xproj", "{3E4DBC41-F38E-4D1C-A6A7-206A132A29D6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0D30A51B-814F-474E-93B8-44E9C155255C}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Hangfire.PostgreSql.Tests", "tests\Hangfire.PostgreSql.Tests\Hangfire.PostgreSql.Tests.xproj", "{6044A48D-730B-4D1F-B03A-EB2B458DAF53}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hangfire.PostgreSql", "src\Hangfire.PostgreSql\Hangfire.PostgreSql.csproj", "{3E4DBC41-F38E-4D1C-A6A7-206A132A29D6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hangfire.PostgreSql.Tests", "tests\Hangfire.PostgreSql.Tests\Hangfire.PostgreSql.Tests.csproj", "{6044A48D-730B-4D1F-B03A-EB2B458DAF53}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
16 changes: 7 additions & 9 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ var target = Argument("target", "Default");

IEnumerable<string> GetFrameworks(string path)
{
var projectJObject = DeserializeJsonFromFile<JObject>(path);
foreach(var prop in ((JObject)projectJObject["frameworks"]).Properties())
{
yield return prop.Name;
}
return new string[] { "netstandard1.4", "net451" };
}

//////////////////////////////////////////////////////////////////////
Expand All @@ -26,7 +22,7 @@ IEnumerable<string> GetFrameworks(string path)
Task("Restore")
.Does(() =>
{
DotNetCoreRestore("src/\" \"tests/");
DotNetCoreRestore();
});

Task("Build")
Expand All @@ -38,9 +34,11 @@ Task("Build")
Configuration = "Release"
};
var projects = GetFiles("./src/**/project.json");
var projects = GetFiles("./src/**/*.csproj");
foreach(var project in projects)
{
Information("Found project: {0}", project);
foreach(var framework in GetFrameworks(project.ToString()))
{
if (!IsRunningOnWindows() && !framework.StartsWith("netstandard"))
Expand All @@ -58,7 +56,7 @@ Task("Test")
.IsDependentOn("Build")
.Does(() =>
{
var files = GetFiles("tests/**/project.json");
var files = GetFiles("tests/**/*.csproj");
foreach(var file in files)
{
DotNetCoreTest(file.ToString());
Expand All @@ -76,7 +74,7 @@ Task("Pack")
NoBuild = true
};
var files = GetFiles("src/**/project.json");
var files = GetFiles("src/**/*.csproj");
foreach(var file in files)
{
DotNetCorePack(file.ToString(), settings);
Expand Down
3 changes: 0 additions & 3 deletions global.json

This file was deleted.

41 changes: 41 additions & 0 deletions src/Hangfire.PostgreSql/Hangfire.PostgreSql.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>PostgreSql storage implementation for Hangfire (background job system for ASP.NET applications).</Description>
<Copyright>Copyright © 2014-2017 Frank Hommers and others</Copyright>
<AssemblyTitle>Hangfire PostgreSql Storage</AssemblyTitle>
<VersionPrefix>1.4.6</VersionPrefix>
<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>
<TargetFrameworks>netstandard1.4;net451</TargetFrameworks>
<AssemblyName>Hangfire.PostgreSql</AssemblyName>
<OutputType>Library</OutputType>
<PackageId>Hangfire.PostgreSql</PackageId>
<PackageTags>Hangfire;PostgreSql;Postgres</PackageTags>
<PackageReleaseNotes>https://github.com/frankhommers/Hangfire.PostgreSql/releases</PackageReleaseNotes>
<PackageProjectUrl>http://hmm.rs/Hangfire.PostgreSql</PackageProjectUrl>
<PackageLicenseUrl>https://raw.github.com/frankhommers/Hangfire.PostgreSql/master/LICENSE.md</PackageLicenseUrl>
<Version>1.4.7</Version>
</PropertyGroup>

<ItemGroup>
<EmbeddedResource Include="*.sql" Exclude="bin\**;obj\**;**\*.xproj;packages\**;@(EmbeddedResource)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Dapper" Version="1.50.2" />
<PackageReference Include="Hangfire.Core" Version="1.6.10" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
<PackageReference Include="Npgsql" Version="3.2.1" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
<DefineConstants>$(DefineConstants);NETCORE1</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<Reference Include="System.Configuration" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

</Project>
21 changes: 0 additions & 21 deletions src/Hangfire.PostgreSql/Hangfire.PostgreSql.xproj

This file was deleted.

4 changes: 2 additions & 2 deletions src/Hangfire.PostgreSql/PostgreSqlJobQueueMonitoringApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ internal class PostgreSqlJobQueueMonitoringApi : IPersistentJobQueueMonitoringAp

public PostgreSqlJobQueueMonitoringApi(IDbConnection connection, PostgreSqlStorageOptions options)
{
if (connection == null) throw new ArgumentNullException("connection");
if (options == null) throw new ArgumentNullException("options");
if (connection == null) throw new ArgumentNullException(nameof(connection));
if (options == null) throw new ArgumentNullException(nameof(options));

_connection = connection;
_options = options;
Expand Down
2 changes: 1 addition & 1 deletion src/Hangfire.PostgreSql/PostgreSqlMonitoringApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public PostgreSqlMonitoringApi(
PostgreSqlStorageOptions options,
PersistentJobQueueProviderCollection queueProviders)
{
if(options==null) throw new ArgumentNullException("options");
if(options==null) throw new ArgumentNullException(nameof(options));

_connectionString = connectionString;
_queueProviders = queueProviders;
Expand Down
Loading

0 comments on commit 1fbaf90

Please sign in to comment.