From 1fbaf90779e2a73a3a20e69d511c60bdfc8a56dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vytautas=20Kasparavi=C4=8Dius?= Date: Tue, 14 Mar 2017 09:50:32 +0200 Subject: [PATCH] Moved to Visual Studio 2017, fixed #63 (https://github.com/frankhommers/Hangfire.PostgreSql/issues/63). --- Hangfire.PostgreSql.sln | 10 +- build.cake | 16 +- global.json | 3 - .../Hangfire.PostgreSql.csproj | 41 ++ .../Hangfire.PostgreSql.xproj | 21 - .../PostgreSqlJobQueueMonitoringApi.cs | 4 +- .../PostgreSqlMonitoringApi.cs | 2 +- .../PostgreSqlWriteOnlyTransaction.cs | 411 +++++++++--------- src/Hangfire.PostgreSql/project.json | 38 -- .../Hangfire.PostgreSql.Tests.csproj | 31 ++ .../Hangfire.PostgreSql.Tests.xproj | 22 - tests/Hangfire.PostgreSql.Tests/project.json | 24 - 12 files changed, 291 insertions(+), 332 deletions(-) delete mode 100644 global.json create mode 100644 src/Hangfire.PostgreSql/Hangfire.PostgreSql.csproj delete mode 100644 src/Hangfire.PostgreSql/Hangfire.PostgreSql.xproj delete mode 100644 src/Hangfire.PostgreSql/project.json create mode 100644 tests/Hangfire.PostgreSql.Tests/Hangfire.PostgreSql.Tests.csproj delete mode 100644 tests/Hangfire.PostgreSql.Tests/Hangfire.PostgreSql.Tests.xproj delete mode 100644 tests/Hangfire.PostgreSql.Tests/project.json diff --git a/Hangfire.PostgreSql.sln b/Hangfire.PostgreSql.sln index 186aec39..f5772e00 100644 --- a/Hangfire.PostgreSql.sln +++ b/Hangfire.PostgreSql.sln @@ -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 diff --git a/build.cake b/build.cake index 6dc0466c..7896e660 100644 --- a/build.cake +++ b/build.cake @@ -12,11 +12,7 @@ var target = Argument("target", "Default"); IEnumerable GetFrameworks(string path) { - var projectJObject = DeserializeJsonFromFile(path); - foreach(var prop in ((JObject)projectJObject["frameworks"]).Properties()) - { - yield return prop.Name; - } + return new string[] { "netstandard1.4", "net451" }; } ////////////////////////////////////////////////////////////////////// @@ -26,7 +22,7 @@ IEnumerable GetFrameworks(string path) Task("Restore") .Does(() => { - DotNetCoreRestore("src/\" \"tests/"); + DotNetCoreRestore(); }); Task("Build") @@ -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")) @@ -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()); @@ -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); diff --git a/global.json b/global.json deleted file mode 100644 index 04970a15..00000000 --- a/global.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "projects": [ "src", "test" ] -} \ No newline at end of file diff --git a/src/Hangfire.PostgreSql/Hangfire.PostgreSql.csproj b/src/Hangfire.PostgreSql/Hangfire.PostgreSql.csproj new file mode 100644 index 00000000..7d2c345a --- /dev/null +++ b/src/Hangfire.PostgreSql/Hangfire.PostgreSql.csproj @@ -0,0 +1,41 @@ + + + + PostgreSql storage implementation for Hangfire (background job system for ASP.NET applications). + Copyright © 2014-2017 Frank Hommers and others + Hangfire PostgreSql Storage + 1.4.6 + 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) + netstandard1.4;net451 + Hangfire.PostgreSql + Library + Hangfire.PostgreSql + Hangfire;PostgreSql;Postgres + https://github.com/frankhommers/Hangfire.PostgreSql/releases + http://hmm.rs/Hangfire.PostgreSql + https://raw.github.com/frankhommers/Hangfire.PostgreSql/master/LICENSE.md + 1.4.7 + + + + + + + + + + + + + + + $(DefineConstants);NETCORE1 + + + + + + + + + diff --git a/src/Hangfire.PostgreSql/Hangfire.PostgreSql.xproj b/src/Hangfire.PostgreSql/Hangfire.PostgreSql.xproj deleted file mode 100644 index dc44b6cd..00000000 --- a/src/Hangfire.PostgreSql/Hangfire.PostgreSql.xproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - - 3e4dbc41-f38e-4d1c-a6a7-206a132a29d6 - Hangfire.PostgreSql - .\obj - .\bin\ - v4.5.2 - - - - 2.0 - - - diff --git a/src/Hangfire.PostgreSql/PostgreSqlJobQueueMonitoringApi.cs b/src/Hangfire.PostgreSql/PostgreSqlJobQueueMonitoringApi.cs index 4fe7356f..9c8a73af 100644 --- a/src/Hangfire.PostgreSql/PostgreSqlJobQueueMonitoringApi.cs +++ b/src/Hangfire.PostgreSql/PostgreSqlJobQueueMonitoringApi.cs @@ -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; diff --git a/src/Hangfire.PostgreSql/PostgreSqlMonitoringApi.cs b/src/Hangfire.PostgreSql/PostgreSqlMonitoringApi.cs index 8bb4b42f..e0b8eb29 100644 --- a/src/Hangfire.PostgreSql/PostgreSqlMonitoringApi.cs +++ b/src/Hangfire.PostgreSql/PostgreSqlMonitoringApi.cs @@ -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; diff --git a/src/Hangfire.PostgreSql/PostgreSqlWriteOnlyTransaction.cs b/src/Hangfire.PostgreSql/PostgreSqlWriteOnlyTransaction.cs index 222f5648..48ad64c1 100644 --- a/src/Hangfire.PostgreSql/PostgreSqlWriteOnlyTransaction.cs +++ b/src/Hangfire.PostgreSql/PostgreSqlWriteOnlyTransaction.cs @@ -31,87 +31,84 @@ namespace Hangfire.PostgreSql { - public class PostgreSqlWriteOnlyTransaction : IWriteOnlyTransaction - { - private readonly Queue> _commandQueue - = new Queue>(); - - private readonly NpgsqlConnection _connection; - private readonly PersistentJobQueueProviderCollection _queueProviders; - private readonly PostgreSqlStorageOptions _options; - - public PostgreSqlWriteOnlyTransaction( - NpgsqlConnection connection, - PostgreSqlStorageOptions options, - PersistentJobQueueProviderCollection queueProviders) - { - if (connection == null) throw new ArgumentNullException("connection"); - if (queueProviders == null) throw new ArgumentNullException("queueProviders"); - if (options == null) throw new ArgumentNullException("options"); - - _connection = connection; -; - _options = options; - _queueProviders = queueProviders; - } - - public void Dispose() - { - } - - public void Commit() - { - using (var transaction = _connection.BeginTransaction(IsolationLevel.RepeatableRead)) - { - - foreach (var command in _commandQueue) - { - try - { - command(_connection, transaction); - } - catch - { - throw; - } - } - transaction.Commit(); - PostgreSqlJobQueue.NewItemInQueueEvent.Set(); - } - } - - public void ExpireJob(string jobId, TimeSpan expireIn) - { - string sql = - string.Format( - @" + public class PostgreSqlWriteOnlyTransaction : JobStorageTransaction + { + private readonly Queue> _commandQueue + = new Queue>(); + + private readonly NpgsqlConnection _connection; + private readonly PersistentJobQueueProviderCollection _queueProviders; + private readonly PostgreSqlStorageOptions _options; + + public PostgreSqlWriteOnlyTransaction( + NpgsqlConnection connection, + PostgreSqlStorageOptions options, + PersistentJobQueueProviderCollection queueProviders) + { + if (connection == null) throw new ArgumentNullException(nameof(connection)); + if (queueProviders == null) throw new ArgumentNullException(nameof(queueProviders)); + if (options == null) throw new ArgumentNullException(nameof(options)); + + _connection = connection; + _options = options; + _queueProviders = queueProviders; + } + + public override void Dispose() + { + } + + public override void Commit() + { + using (var transaction = _connection.BeginTransaction(IsolationLevel.RepeatableRead)) + { + foreach (var command in _commandQueue) + { + try + { + command(_connection, transaction); + } + catch + { + throw; + } + } + transaction.Commit(); + PostgreSqlJobQueue.NewItemInQueueEvent.Set(); + } + } + + public override void ExpireJob(string jobId, TimeSpan expireIn) + { + string sql = + string.Format( + @" UPDATE """ + _options.SchemaName + @""".""job"" SET ""expireat"" = NOW() AT TIME ZONE 'UTC' + INTERVAL '{0} SECONDS' WHERE ""id"" = @id; ", - (long)expireIn.TotalSeconds); + (long) expireIn.TotalSeconds); - QueueCommand((con, trx) => con.Execute( - sql, - new { id = Convert.ToInt32(jobId, CultureInfo.InvariantCulture) }, trx)); - } + QueueCommand((con, trx) => con.Execute( + sql, + new {id = Convert.ToInt32(jobId, CultureInfo.InvariantCulture)}, trx)); + } - public void PersistJob(string jobId) - { - QueueCommand((con, trx) => con.Execute( - @" + public override void PersistJob(string jobId) + { + QueueCommand((con, trx) => con.Execute( + @" UPDATE """ + _options.SchemaName + @""".""job"" SET ""expireat"" = NULL WHERE ""id"" = @id; ", - new { id = Convert.ToInt32(jobId, CultureInfo.InvariantCulture) }, trx)); - } + new {id = Convert.ToInt32(jobId, CultureInfo.InvariantCulture)}, trx)); + } - public void SetJobState(string jobId, IState state) - { - - string addAndSetStateSql = @" + public override void SetJobState(string jobId, IState state) + { + string addAndSetStateSql = @" WITH s AS ( INSERT INTO """ + _options.SchemaName + @""".""state"" (""jobid"", ""name"", ""reason"", ""createdat"", ""data"") VALUES (@jobId, @name, @reason, @createdAt, @data) RETURNING ""id"" @@ -122,106 +119,106 @@ FROM s WHERE j.""id"" = @id; "; - QueueCommand((con, trx) => con.Execute( - addAndSetStateSql, - new - { - jobId = Convert.ToInt32(jobId, CultureInfo.InvariantCulture), - name = state.Name, - reason = state.Reason, - createdAt = DateTime.UtcNow, - data = JobHelper.ToJson(state.SerializeData()), - id = Convert.ToInt32(jobId,CultureInfo.InvariantCulture) - }, trx)); - } - - public void AddJobState(string jobId, IState state) - { - string addStateSql = @" + QueueCommand((con, trx) => con.Execute( + addAndSetStateSql, + new + { + jobId = Convert.ToInt32(jobId, CultureInfo.InvariantCulture), + name = state.Name, + reason = state.Reason, + createdAt = DateTime.UtcNow, + data = JobHelper.ToJson(state.SerializeData()), + id = Convert.ToInt32(jobId, CultureInfo.InvariantCulture) + }, trx)); + } + + public override void AddJobState(string jobId, IState state) + { + string addStateSql = @" INSERT INTO """ + _options.SchemaName + @""".""state"" (""jobid"", ""name"", ""reason"", ""createdat"", ""data"") VALUES (@jobId, @name, @reason, @createdAt, @data); "; - QueueCommand((con, trx) => con.Execute( - addStateSql, - new - { - jobId = Convert.ToInt32(jobId, CultureInfo.InvariantCulture), - name = state.Name, - reason = state.Reason, - createdAt = DateTime.UtcNow, - data = JobHelper.ToJson(state.SerializeData()) - }, trx)); - } - - public void AddToQueue(string queue, string jobId) - { - var provider = _queueProviders.GetProvider(queue); - var persistentQueue = provider.GetJobQueue(_connection); - - QueueCommand((con, trx) => persistentQueue.Enqueue(queue, jobId)); - } - - - public void IncrementCounter(string key) - { - QueueCommand((con, trx) => con.Execute( - @" + QueueCommand((con, trx) => con.Execute( + addStateSql, + new + { + jobId = Convert.ToInt32(jobId, CultureInfo.InvariantCulture), + name = state.Name, + reason = state.Reason, + createdAt = DateTime.UtcNow, + data = JobHelper.ToJson(state.SerializeData()) + }, trx)); + } + + public override void AddToQueue(string queue, string jobId) + { + var provider = _queueProviders.GetProvider(queue); + var persistentQueue = provider.GetJobQueue(_connection); + + QueueCommand((con, trx) => persistentQueue.Enqueue(queue, jobId)); + } + + + public override void IncrementCounter(string key) + { + QueueCommand((con, trx) => con.Execute( + @" INSERT INTO """ + _options.SchemaName + @""".""counter"" (""key"", ""value"") VALUES (@key, @value); ", - new { key, value = +1 }, trx)); - } - - public void IncrementCounter(string key, TimeSpan expireIn) - { - string sql = - string.Format( - @" + new {key, value = +1}, trx)); + } + + public override void IncrementCounter(string key, TimeSpan expireIn) + { + string sql = + string.Format( + @" INSERT INTO """ + _options.SchemaName + @""".""counter""(""key"", ""value"", ""expireat"") VALUES (@key, @value, NOW() AT TIME ZONE 'UTC' + INTERVAL '{0} SECONDS'); ", - (long)expireIn.TotalSeconds); + (long) expireIn.TotalSeconds); - QueueCommand((con, trx) => con.Execute( - sql, - new { key, value = +1 }, trx)); - } + QueueCommand((con, trx) => con.Execute( + sql, + new {key, value = +1}, trx)); + } - public void DecrementCounter(string key) - { - QueueCommand((con, trx) => con.Execute( - @" + public override void DecrementCounter(string key) + { + QueueCommand((con, trx) => con.Execute( + @" INSERT INTO """ + _options.SchemaName + @""".""counter""(""key"", ""value"") VALUES (@key, @value) ", - new { key, value = -1 }, trx)); - } - - public void DecrementCounter(string key, TimeSpan expireIn) - { - string sql = - string.Format( - @" + new {key, value = -1}, trx)); + } + + public override void DecrementCounter(string key, TimeSpan expireIn) + { + string sql = + string.Format( + @" INSERT INTO """ + _options.SchemaName + @""".""counter""(""key"", ""value"", ""expireat"") VALUES (@key, @value, NOW() AT TIME ZONE 'UTC' + INTERVAL '{0} SECONDS'); ", - (long) expireIn.TotalSeconds); + (long) expireIn.TotalSeconds); - QueueCommand((con, trx) => con.Execute(sql - , - new { key, value = -1 }, trx)); - } + QueueCommand((con, trx) => con.Execute(sql + , + new {key, value = -1}, trx)); + } - public void AddToSet(string key, string value) - { - AddToSet(key, value, 0.0); - } + public override void AddToSet(string key, string value) + { + AddToSet(key, value, 0.0); + } - public void AddToSet(string key, string value, double score) - { - string addSql = @" + public override void AddToSet(string key, string value, double score) + { + string addSql = @" WITH ""inputvalues"" AS ( SELECT @key ""key"", @value ""value"", @score ""score"" ), ""updatedrows"" AS ( @@ -242,47 +239,47 @@ SELECT 1 ); "; - QueueCommand((con, trx) => con.Execute( - addSql, - new { key, value, score }, trx)); - } + QueueCommand((con, trx) => con.Execute( + addSql, + new {key, value, score}, trx)); + } - public void RemoveFromSet(string key, string value) - { - QueueCommand((con, trx) => con.Execute( - @" + public override void RemoveFromSet(string key, string value) + { + QueueCommand((con, trx) => con.Execute( + @" DELETE FROM """ + _options.SchemaName + @""".""set"" WHERE ""key"" = @key AND ""value"" = @value; ", - new { key, value }, trx)); - } + new {key, value}, trx)); + } - public void InsertToList(string key, string value) - { - QueueCommand((con, trx) => con.Execute( - @" + public override void InsertToList(string key, string value) + { + QueueCommand((con, trx) => con.Execute( + @" INSERT INTO """ + _options.SchemaName + @""".""list"" (""key"", ""value"") VALUES (@key, @value); ", - new { key, value }, trx)); - } + new {key, value}, trx)); + } - public void RemoveFromList(string key, string value) - { - QueueCommand((con, trx) => con.Execute( - @" + public override void RemoveFromList(string key, string value) + { + QueueCommand((con, trx) => con.Execute( + @" DELETE FROM """ + _options.SchemaName + @""".""list"" WHERE ""key"" = @key AND ""value"" = @value; ", - new { key, value }, trx)); - } + new {key, value}, trx)); + } - public void TrimList(string key, int keepStartingFrom, int keepEndingAt) - { - string trimSql = - @" + public override void TrimList(string key, int keepStartingFrom, int keepEndingAt) + { + string trimSql = + @" DELETE FROM """ + _options.SchemaName + @""".""list"" AS source WHERE ""key"" = @key AND ""id"" NOT IN ( @@ -294,17 +291,17 @@ OFFSET @start LIMIT @end ); "; - QueueCommand((con, trx) => con.Execute( - trimSql, - new { key = key, start = keepStartingFrom, end = (keepEndingAt - keepStartingFrom + 1) }, trx)); - } + QueueCommand((con, trx) => con.Execute( + trimSql, + new {key = key, start = keepStartingFrom, end = (keepEndingAt - keepStartingFrom + 1)}, trx)); + } - public void SetRangeInHash(string key, IEnumerable> keyValuePairs) - { - if (key == null) throw new ArgumentNullException("key"); - if (keyValuePairs == null) throw new ArgumentNullException("keyValuePairs"); + public override void SetRangeInHash(string key, IEnumerable> keyValuePairs) + { + if (key == null) throw new ArgumentNullException("key"); + if (keyValuePairs == null) throw new ArgumentNullException("keyValuePairs"); - string sql = @" + string sql = @" WITH ""inputvalues"" AS ( SELECT @key ""key"", @field ""field"", @value ""value"" ), ""updatedrows"" AS ( @@ -326,29 +323,29 @@ SELECT 1 ); "; - foreach (var keyValuePair in keyValuePairs) - { - var pair = keyValuePair; - - QueueCommand((con, trx) => con.Execute(sql, new { key = key, field = pair.Key, value = pair.Value }, trx)); - } - } - - public void RemoveHash(string key) - { - if (key == null) throw new ArgumentNullException("key"); - - QueueCommand((con, trx) => con.Execute( - @" -DELETE FROM """ + _options.SchemaName + @""".""hash"" -WHERE ""key"" = @key; -", - new { key }, trx)); - } - - internal void QueueCommand(Action action) - { - _commandQueue.Enqueue(action); - } - } + foreach (var keyValuePair in keyValuePairs) + { + var pair = keyValuePair; + + QueueCommand((con, trx) => con.Execute(sql, new {key = key, field = pair.Key, value = pair.Value}, trx)); + } + } + + public override void RemoveHash(string key) + { + if (key == null) throw new ArgumentNullException(nameof(key)); + + QueueCommand((con, trx) => con.Execute( + @" + DELETE FROM """ + _options.SchemaName + @""".""hash"" + WHERE ""key"" = @key; + ", + new {key}, trx)); + } + + internal void QueueCommand(Action action) + { + _commandQueue.Enqueue(action); + } + } } \ No newline at end of file diff --git a/src/Hangfire.PostgreSql/project.json b/src/Hangfire.PostgreSql/project.json deleted file mode 100644 index bc25d1f3..00000000 --- a/src/Hangfire.PostgreSql/project.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "version": "1.4.6", - "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)" ], - "title": "Hangfire PostgreSql Storage", - "description": "PostgreSql storage implementation for Hangfire (background job system for ASP.NET applications).", - "copyright": "Copyright © 2014-2017 Frank Hommers and others", - "packOptions": { - "summary": "Latest build of Hangfire.PostgreSql with many fixes and new PostgreSql driver support.", - "projectUrl": "http://hmm.rs/Hangfire.PostgreSql", - "owners": [ "frankhommers" ], - "requireLicenseAcceptance": false, - "licenseUrl": "https://raw.github.com/frankhommers/Hangfire.PostgreSql/master/LICENSE.md", - "releaseNotes": "https://github.com/frankhommers/Hangfire.PostgreSql/releases", - "tags": [ "Hangfire", "PostgreSql", "Postgres" ] - }, - "buildOptions": { - "embed": "*.sql", - "emitEntryPoint": false - }, - "dependencies": { - "Dapper": "1.50.2", - "Hangfire.Core": "1.6.8", - "Newtonsoft.Json": "9.0.1", - "Npgsql": "3.1.9" - }, - "frameworks": { - "netstandard1.4": { - "buildOptions": { - "define": [ "NETCORE1" ] - } - }, - "net451": { - "frameworkAssemblies": { - "System.Configuration": "4.0.0" - } - } - } -} \ No newline at end of file diff --git a/tests/Hangfire.PostgreSql.Tests/Hangfire.PostgreSql.Tests.csproj b/tests/Hangfire.PostgreSql.Tests/Hangfire.PostgreSql.Tests.csproj new file mode 100644 index 00000000..3607f96f --- /dev/null +++ b/tests/Hangfire.PostgreSql.Tests/Hangfire.PostgreSql.Tests.csproj @@ -0,0 +1,31 @@ + + + + Hangfire.PostgreSql.Tests + netcoreapp1.0 + Hangfire.PostgreSql.Tests + Hangfire.PostgreSql.Tests + true + 1.1.1 + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/Hangfire.PostgreSql.Tests/Hangfire.PostgreSql.Tests.xproj b/tests/Hangfire.PostgreSql.Tests/Hangfire.PostgreSql.Tests.xproj deleted file mode 100644 index 4841eb5e..00000000 --- a/tests/Hangfire.PostgreSql.Tests/Hangfire.PostgreSql.Tests.xproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 6044a48d-730b-4d1f-b03a-eb2b458daf53 - Hangfire.PostgreSql.Tests - .\obj - .\bin\ - v4.6 - - - 2.0 - - - - - - \ No newline at end of file diff --git a/tests/Hangfire.PostgreSql.Tests/project.json b/tests/Hangfire.PostgreSql.Tests/project.json deleted file mode 100644 index 72afa01f..00000000 --- a/tests/Hangfire.PostgreSql.Tests/project.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "title": "Hangfire.PostgreSql.Tests", - "version": "1.0.0-*", - "testRunner": "xunit", - "buildOptions": { - "embed": "*.sql" - }, - "dependencies": { - "xunit": "2.2.0-*", - "dotnet-test-xunit": "2.2.0-preview2-*", - "Hangfire.PostgreSql": { "target": "project" }, - "Moq": "4.6.38-alpha" - }, - "frameworks": { - "netcoreapp1.0": { - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.1.0", - "type": "platform" - } - } - } - } -} \ No newline at end of file