From 8426259e311c5e7ebc3063319912229d5f5f9109 Mon Sep 17 00:00:00 2001 From: Falkvinge Date: Sat, 12 Nov 2016 12:12:15 +0100 Subject: [PATCH] Various tweaks to make buildable on VS2015 --- Backend/Backend.csproj | 37 ++++++------ Backend/app.config | 4 ++ Backend/packages.config | 10 ++-- Basic/Basic.csproj | 16 ++---- Basic/packages.config | 6 +- Interface/Interface.csproj | 24 ++++---- Interface/app.config | 4 ++ Interface/packages.config | 4 +- Logic/Financial/BitcoinTransactionInput.cs | 2 +- Logic/Financial/BitcoinUtility.cs | 11 ++-- Logic/Financial/HotBitcoinAddresses.cs | 3 +- Logic/Financial/Payouts.cs | 4 +- Logic/Logic.csproj | 67 +++++++++++----------- Logic/Special/DummyBitcoin.cs | 2 +- Logic/app.config | 4 ++ Logic/packages.config | 18 +++--- Packages/repositories.config | 12 ---- Site/Security/Login.aspx.cs | 2 +- Site/Site.csproj | 40 ++++++++++++- Site/packages.config | 14 ++--- Site/web.config | 4 ++ Tests/Tests.csproj | 26 ++++----- Tests/app.config | 15 +++++ Tests/packages.config | 8 +-- Utility/Utility.csproj | 16 ++---- Utility/app.config | 4 ++ Utility/packages.config | 6 +- 27 files changed, 204 insertions(+), 159 deletions(-) delete mode 100644 Packages/repositories.config create mode 100644 Tests/app.config diff --git a/Backend/Backend.csproj b/Backend/Backend.csproj index 726ff411..831e8d16 100644 --- a/Backend/Backend.csproj +++ b/Backend/Backend.csproj @@ -63,37 +63,36 @@ ..\External Libraries\mono.posix.dll - - ..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.dll + + ..\packages\NBitcoin.3.0.0.72\lib\net45\NBitcoin.dll True - - ..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.BouncyCastle.dll + + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll True - - ..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll - True - - - ..\packages\protobuf-net.2.0.0.668\lib\net40\protobuf-net.dll + + ..\packages\protobuf-net.2.1.0\lib\net45\protobuf-net.dll True - - False - ..\packages\Microsoft.Tpl.Dataflow.4.5.9\lib\net45\System.Threading.Tasks.Dataflow.dll + + ..\packages\Microsoft.Tpl.Dataflow.4.5.24\lib\portable-net45+win8+wpa81\System.Threading.Tasks.Dataflow.dll + True - - ..\packages\vtortola.WebSocketListener.2.1.5.0\lib\net45\vtortola.WebSockets.dll + + ..\packages\vtortola.WebSocketListener.2.2.2.0\lib\net45\vtortola.WebSockets.dll + True - - ..\packages\vtortola.WebSocketListener.2.1.5.0\lib\net45\vtortola.WebSockets.Deflate.dll + + ..\packages\vtortola.WebSocketListener.2.2.2.0\lib\net45\vtortola.WebSockets.Deflate.dll + True - - ..\packages\vtortola.WebSocketListener.2.1.5.0\lib\net45\vtortola.WebSockets.Rfc6455.dll + + ..\packages\vtortola.WebSocketListener.2.2.2.0\lib\net45\vtortola.WebSockets.Rfc6455.dll + True diff --git a/Backend/app.config b/Backend/app.config index 51b0aa66..279a8697 100644 --- a/Backend/app.config +++ b/Backend/app.config @@ -7,6 +7,10 @@ + + + + diff --git a/Backend/packages.config b/Backend/packages.config index 6cfa1992..1cf999c4 100644 --- a/Backend/packages.config +++ b/Backend/packages.config @@ -1,8 +1,8 @@  - - - - - + + + + + \ No newline at end of file diff --git a/Basic/Basic.csproj b/Basic/Basic.csproj index 5824903f..e9777b10 100644 --- a/Basic/Basic.csproj +++ b/Basic/Basic.csproj @@ -49,20 +49,16 @@ false - - ..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.dll + + ..\packages\NBitcoin.3.0.0.72\lib\net45\NBitcoin.dll True - - ..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.BouncyCastle.dll + + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll True - - ..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll - True - - - ..\packages\protobuf-net.2.0.0.668\lib\net40\protobuf-net.dll + + ..\packages\protobuf-net.2.1.0\lib\net45\protobuf-net.dll True diff --git a/Basic/packages.config b/Basic/packages.config index 016ca340..46d787f8 100644 --- a/Basic/packages.config +++ b/Basic/packages.config @@ -1,6 +1,6 @@  - - - + + + \ No newline at end of file diff --git a/Interface/Interface.csproj b/Interface/Interface.csproj index aed60a05..00563a1b 100644 --- a/Interface/Interface.csproj +++ b/Interface/Interface.csproj @@ -53,23 +53,23 @@ - - False - ..\packages\Microsoft.Tpl.Dataflow.4.5.9\lib\net45\System.Threading.Tasks.Dataflow.dll + + ..\packages\Microsoft.Tpl.Dataflow.4.5.24\lib\portable-net45+win8+wpa81\System.Threading.Tasks.Dataflow.dll + True - - False - ..\packages\vtortola.WebSocketListener.2.1.5.0\lib\net45\vtortola.WebSockets.dll + + ..\packages\vtortola.WebSocketListener.2.2.2.0\lib\net45\vtortola.WebSockets.dll + True - - False - ..\packages\vtortola.WebSocketListener.2.1.5.0\lib\net45\vtortola.WebSockets.Deflate.dll + + ..\packages\vtortola.WebSocketListener.2.2.2.0\lib\net45\vtortola.WebSockets.Deflate.dll + True - - False - ..\packages\vtortola.WebSocketListener.2.1.5.0\lib\net45\vtortola.WebSockets.Rfc6455.dll + + ..\packages\vtortola.WebSocketListener.2.2.2.0\lib\net45\vtortola.WebSockets.Rfc6455.dll + True diff --git a/Interface/app.config b/Interface/app.config index 46b0dccb..51722df3 100644 --- a/Interface/app.config +++ b/Interface/app.config @@ -6,6 +6,10 @@ + + + + \ No newline at end of file diff --git a/Interface/packages.config b/Interface/packages.config index 4a7f1074..63f0df0f 100644 --- a/Interface/packages.config +++ b/Interface/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/Logic/Financial/BitcoinTransactionInput.cs b/Logic/Financial/BitcoinTransactionInput.cs index 94c5fece..4c1c0f91 100644 --- a/Logic/Financial/BitcoinTransactionInput.cs +++ b/Logic/Financial/BitcoinTransactionInput.cs @@ -63,7 +63,7 @@ namespace Swarmops.Logic.Financial N = (uint) input.TransactionOutputIndex }, new TxOut (new Satoshis (input.AmountSatoshis), - new BitcoinAddress (input.BitcoinAddress, Network.Main)))); + new BitcoinPubKeyAddress (input.BitcoinAddress, Network.Main)))); } return coinList.ToArray(); diff --git a/Logic/Financial/BitcoinUtility.cs b/Logic/Financial/BitcoinUtility.cs index a45f7f0e..bedc86a5 100644 --- a/Logic/Financial/BitcoinUtility.cs +++ b/Logic/Financial/BitcoinUtility.cs @@ -14,7 +14,6 @@ using System.Threading.Tasks; using System.Web; using System.Web.Configuration; using NBitcoin; -using NBitcoin.BouncyCastle.Asn1.Ocsp; using Newtonsoft.Json.Linq; using Swarmops.Database; using Swarmops.Logic.Communications; @@ -293,7 +292,7 @@ namespace Swarmops.Logic.Financial return BitcoinTransactionInputs.FromSingle (lowestSingleSufficientInput); } - throw new NotEnoughFundsException(); + throw new NotEnoughFundsException("Insufficient funds", "group argument", new Satoshis(satoshis)); // Slightly more complex checking (TODO) } @@ -588,7 +587,7 @@ namespace Swarmops.Logic.Financial { try { - BitcoinAddress singleAddress = new BitcoinAddress (address, Network.Main); + BitcoinAddress singleAddress = new BitcoinPubKeyAddress (address, Network.Main); return true; } // ReSharper disable once EmptyGeneralCatchClause @@ -688,7 +687,7 @@ namespace Swarmops.Logic.Financial if (bitcoinTestAddress.StartsWith("1")) // regular address { - txBuilder = txBuilder.Send(new BitcoinAddress(bitcoinTestAddress), + txBuilder = txBuilder.Send(new BitcoinPubKeyAddress(bitcoinTestAddress), new Satoshis(satoshis)); } else if (bitcoinTestAddress.StartsWith("3")) // multisig @@ -704,7 +703,7 @@ namespace Swarmops.Logic.Financial // Set change address to wallet slush - txBuilder.SetChange(new BitcoinAddress(changeAddress.Address)); + txBuilder.SetChange(new BitcoinPubKeyAddress(changeAddress.Address)); // Add fee @@ -782,7 +781,7 @@ namespace Swarmops.Logic.Financial N = source.TransactionOutputIndex }, new TxOut (new NBitcoin.Money (source.Satoshis), - new BitcoinAddress (source.BitcoinAddress, Network.Main))); + new BitcoinPubKeyAddress (source.BitcoinAddress, Network.Main))); } } } diff --git a/Logic/Financial/HotBitcoinAddresses.cs b/Logic/Financial/HotBitcoinAddresses.cs index ad80f263..51aa78b9 100644 --- a/Logic/Financial/HotBitcoinAddresses.cs +++ b/Logic/Financial/HotBitcoinAddresses.cs @@ -9,6 +9,7 @@ using Swarmops.Basic.Types.Financial; using Swarmops.Database; using Swarmops.Logic.Structure; using Swarmops.Logic.Support; +using Satoshis = NBitcoin.Money; namespace Swarmops.Logic.Financial { @@ -64,7 +65,7 @@ namespace Swarmops.Logic.Financial return workCopy[lastSufficientIndex].Unspents.AsInputs; } - throw new NotEnoughFundsException(); // Serving as a placeholder for now, also testing the notification + throw new NotEnoughFundsException("Insufficient funds", "Group argument", new Satoshis (satoshisRequired)); // Serving as a placeholder for now, also testing the notification throw new NotImplementedException("This fundfinding path is not completed"); // TODO } diff --git a/Logic/Financial/Payouts.cs b/Logic/Financial/Payouts.cs index 680a0e75..2b055ea6 100644 --- a/Logic/Financial/Payouts.cs +++ b/Logic/Financial/Payouts.cs @@ -666,7 +666,7 @@ namespace Swarmops.Logic.Financial if (payout.RecipientPerson.BitcoinPayoutAddress.StartsWith ("1")) // regular address { - txBuilder = txBuilder.Send (new BitcoinAddress (payout.RecipientPerson.BitcoinPayoutAddress), + txBuilder = txBuilder.Send (new BitcoinPubKeyAddress (payout.RecipientPerson.BitcoinPayoutAddress), new Satoshis (satoshiPayoutLookup[payout.ProtoIdentity])); } else if (payout.RecipientPerson.BitcoinPayoutAddress.StartsWith ("3")) // multisig @@ -686,7 +686,7 @@ namespace Swarmops.Logic.Financial // Set change address to wallet slush - txBuilder.SetChange (new BitcoinAddress (changeAddress.Address)); + txBuilder.SetChange (new BitcoinPubKeyAddress (changeAddress.Address)); // Add fee diff --git a/Logic/Logic.csproj b/Logic/Logic.csproj index ff3ceb39..129f400e 100644 --- a/Logic/Logic.csproj +++ b/Logic/Logic.csproj @@ -49,12 +49,12 @@ false - - ..\packages\NGeoIP.1.0.1\lib\net45\AutoMapper.dll + + ..\packages\AutoMapper.5.1.1\lib\net45\AutoMapper.dll True - - ..\packages\NGeoIP.1.0.1\lib\net45\AutoMapper.Net4.dll + + ..\packages\BouncyCastle.1.8.1\lib\BouncyCastle.Crypto.dll True @@ -64,28 +64,28 @@ False ..\External Libraries\MySql.Data.dll - - ..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.dll + + ..\packages\NBitcoin.3.0.0.72\lib\net45\NBitcoin.dll True - - ..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.BouncyCastle.dll - True - - - ..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll + + ..\packages\NBitcoin.Mono.3.0.0.49\lib\net45\Newtonsoft.Json.dll True ..\packages\NGeoIP.1.0.1\lib\net45\NGeoIP.dll True - - ..\packages\protobuf-net.2.0.0.668\lib\net40\protobuf-net.dll + + ..\packages\NUnit.3.5.0\lib\net45\nunit.framework.dll True - - ..\packages\NGeoIP.1.0.1\lib\net45\RestSharp.dll + + ..\packages\protobuf-net.2.1.0\lib\net45\protobuf-net.dll + True + + + ..\packages\RestSharp.105.2.3\lib\net45\RestSharp.dll True @@ -97,24 +97,25 @@ - - False - ..\packages\Microsoft.Tpl.Dataflow.4.5.9\lib\net45\System.Threading.Tasks.Dataflow.dll + + ..\packages\Microsoft.Tpl.Dataflow.4.5.24\lib\portable-net45+win8+wpa81\System.Threading.Tasks.Dataflow.dll + True - - False - ..\packages\vtortola.WebSocketListener.2.1.5.0\lib\net45\vtortola.WebSockets.dll + + ..\packages\vtortola.WebSocketListener.2.2.2.0\lib\net45\vtortola.WebSockets.dll + True - - ..\packages\vtortola.WebSocketListener.2.1.5.0\lib\net45\vtortola.WebSockets.Deflate.dll + + ..\packages\vtortola.WebSocketListener.2.2.2.0\lib\net45\vtortola.WebSockets.Deflate.dll + True - - False - ..\packages\vtortola.WebSocketListener.2.1.5.0\lib\net45\vtortola.WebSockets.Rfc6455.dll + + ..\packages\vtortola.WebSocketListener.2.2.2.0\lib\net45\vtortola.WebSockets.Rfc6455.dll + True @@ -177,9 +178,7 @@ True Logic.Communications.Transmission.MailPayload.resx - - Component - + @@ -719,15 +718,13 @@ - - AutoMapper.Net4.dll - PreserveNewest - - + + Designer + diff --git a/Logic/Special/DummyBitcoin.cs b/Logic/Special/DummyBitcoin.cs index 9de59796..09aa0200 100644 --- a/Logic/Special/DummyBitcoin.cs +++ b/Logic/Special/DummyBitcoin.cs @@ -10,7 +10,7 @@ namespace Swarmops.Logic.Special { public DummyBitcoin() { - Address = new BitcoinAddress ("abcdefgh"); + Address = new BitcoinPubKeyAddress ("abcdefgh"); } public static BitcoinAddress Address { get; set; } diff --git a/Logic/app.config b/Logic/app.config index 46b0dccb..51722df3 100644 --- a/Logic/app.config +++ b/Logic/app.config @@ -6,6 +6,10 @@ + + + + \ No newline at end of file diff --git a/Logic/packages.config b/Logic/packages.config index ac670af4..f26b6e8f 100644 --- a/Logic/packages.config +++ b/Logic/packages.config @@ -1,12 +1,14 @@  - - - - + + + + + + - - - - + + + + \ No newline at end of file diff --git a/Packages/repositories.config b/Packages/repositories.config deleted file mode 100644 index 1e1e0306..00000000 --- a/Packages/repositories.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/Site/Security/Login.aspx.cs b/Site/Security/Login.aspx.cs index 533d0103..081e30b7 100644 --- a/Site/Security/Login.aspx.cs +++ b/Site/Security/Login.aspx.cs @@ -194,7 +194,7 @@ namespace Swarmops.Pages.Security protected void ProcessRespondBitId (BitIdCredentials credentials, HttpResponse response) { - BitcoinAddress testAddress = new BitcoinAddress (credentials.address); + BitcoinPubKeyAddress testAddress = new BitcoinPubKeyAddress (credentials.address); if (testAddress.VerifyMessage (credentials.uri, credentials.signature)) { // woooooo diff --git a/Site/Site.csproj b/Site/Site.csproj index d0316c1c..4936880c 100644 --- a/Site/Site.csproj +++ b/Site/Site.csproj @@ -21,6 +21,7 @@ ..\ true + true @@ -41,15 +42,35 @@ 4 + + ..\packages\AutoMapper.5.1.1\lib\net45\AutoMapper.dll + True + - - False - bin/NBitcoin.dll + + ..\packages\NBitcoin.3.0.0.72\lib\net45\NBitcoin.dll + True + + + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + True False bin/NGeoIP.dll + + ..\packages\protobuf-net.2.1.0\lib\net45\protobuf-net.dll + True + + + ..\packages\RestSharp.105.2.3\lib\net45\RestSharp.dll + True + + + ..\packages\Microsoft.Tpl.Dataflow.4.5.24\lib\portable-net45+win8+wpa81\System.Threading.Tasks.Dataflow.dll + True + @@ -66,6 +87,18 @@ + + ..\packages\vtortola.WebSocketListener.2.2.2.0\lib\net45\vtortola.WebSockets.dll + True + + + ..\packages\vtortola.WebSocketListener.2.2.2.0\lib\net45\vtortola.WebSockets.Deflate.dll + True + + + ..\packages\vtortola.WebSocketListener.2.2.2.0\lib\net45\vtortola.WebSockets.Rfc6455.dll + True + @@ -532,6 +565,7 @@ MonthlyTaxForm-SE.aspx + ASPXCodeBehind FinalizeLogin.aspx diff --git a/Site/packages.config b/Site/packages.config index 983b224d..097aa1c2 100644 --- a/Site/packages.config +++ b/Site/packages.config @@ -1,11 +1,11 @@  - - - - + + + + - - - + + + \ No newline at end of file diff --git a/Site/web.config b/Site/web.config index 935db0e3..72d532b3 100644 --- a/Site/web.config +++ b/Site/web.config @@ -76,6 +76,10 @@ + + + + diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index e9f2859c..e44d7f50 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -32,23 +32,20 @@ 4 - - ..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.dll + + ..\packages\NBitcoin.3.0.0.72\lib\net45\NBitcoin.dll True - - ..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.BouncyCastle.dll + + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll True - - ..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll + + ..\packages\NUnit.3.5.0\lib\net45\nunit.framework.dll True - - ..\packages\NUnit.2.6.3\lib\nunit.framework.dll - - - ..\packages\protobuf-net.2.0.0.668\lib\net40\protobuf-net.dll + + ..\packages\protobuf-net.2.1.0\lib\net45\protobuf-net.dll True @@ -65,15 +62,16 @@ - - - {13e59551-34ac-43dc-9a03-ef5e4721dc61} Logic + + + + diff --git a/Tests/app.config b/Tests/app.config new file mode 100644 index 00000000..51722df3 --- /dev/null +++ b/Tests/app.config @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Tests/packages.config b/Tests/packages.config index 719c45f2..d00e8687 100644 --- a/Tests/packages.config +++ b/Tests/packages.config @@ -1,7 +1,7 @@  - - - - + + + + \ No newline at end of file diff --git a/Utility/Utility.csproj b/Utility/Utility.csproj index 2554f06a..1f3af2ea 100644 --- a/Utility/Utility.csproj +++ b/Utility/Utility.csproj @@ -51,24 +51,20 @@ - - ..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.dll + + ..\packages\NBitcoin.3.0.0.72\lib\net45\NBitcoin.dll True - - ..\packages\NBitcoin.2.1.4.7\lib\net45\NBitcoin.BouncyCastle.dll - True - - - ..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll + + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll True False ..\External Libraries\NRss.dll - - ..\packages\protobuf-net.2.0.0.668\lib\net40\protobuf-net.dll + + ..\packages\protobuf-net.2.1.0\lib\net45\protobuf-net.dll True diff --git a/Utility/app.config b/Utility/app.config index 46b0dccb..51722df3 100644 --- a/Utility/app.config +++ b/Utility/app.config @@ -6,6 +6,10 @@ + + + + \ No newline at end of file diff --git a/Utility/packages.config b/Utility/packages.config index 016ca340..46d787f8 100644 --- a/Utility/packages.config +++ b/Utility/packages.config @@ -1,6 +1,6 @@  - - - + + + \ No newline at end of file