Skip to content

Commit be31172

Browse files
author
Graeme Foster
committed
Updated octopus client to get around some json serialization issues when running against a 3.x octopus server
1 parent 31b0666 commit be31172

File tree

11 files changed

+48
-51
lines changed

11 files changed

+48
-51
lines changed

AzureWebFarm.OctopusDeploy.Tests/AzureWebFarm.OctopusDeploy.Tests.csproj

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,29 +52,21 @@
5252
<Reference Include="Microsoft.Web.XmlTransform">
5353
<HintPath>..\packages\Microsoft.Web.Xdt.1.0.0\lib\net40\Microsoft.Web.XmlTransform.dll</HintPath>
5454
</Reference>
55-
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
56-
<SpecificVersion>False</SpecificVersion>
57-
<HintPath>..\packages\Newtonsoft.Json.5.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
55+
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
56+
<HintPath>..\packages\Newtonsoft.Json.6.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
57+
<Private>True</Private>
5858
</Reference>
5959
<Reference Include="NSubstitute, Version=1.7.2.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
6060
<SpecificVersion>False</SpecificVersion>
6161
<HintPath>..\packages\NSubstitute.1.7.2.0\lib\NET45\NSubstitute.dll</HintPath>
6262
</Reference>
63-
<Reference Include="Octopus.Client, Version=2.0.12.0, Culture=neutral, processorArchitecture=MSIL">
64-
<SpecificVersion>False</SpecificVersion>
65-
<HintPath>..\packages\Octopus.Client.2.0.12.1092\lib\net40\Octopus.Client.dll</HintPath>
66-
</Reference>
67-
<Reference Include="Octopus.Platform, Version=2.0.12.0, Culture=neutral, processorArchitecture=MSIL">
68-
<SpecificVersion>False</SpecificVersion>
69-
<HintPath>..\packages\Octopus.Client.2.0.12.1092\lib\net40\Octopus.Platform.dll</HintPath>
63+
<Reference Include="Octopus.Client, Version=3.1.7.0, Culture=neutral, processorArchitecture=MSIL">
64+
<HintPath>..\packages\Octopus.Client.3.1.7\lib\net40\Octopus.Client.dll</HintPath>
65+
<Private>True</Private>
7066
</Reference>
7167
<Reference Include="Shouldly">
7268
<HintPath>..\packages\Shouldly.1.1.1.1\lib\35\Shouldly.dll</HintPath>
7369
</Reference>
74-
<Reference Include="Sprache, Version=1.10.0.35, Culture=neutral, processorArchitecture=MSIL">
75-
<SpecificVersion>False</SpecificVersion>
76-
<HintPath>..\packages\Sprache.1.10.0.35\lib\net40\Sprache.dll</HintPath>
77-
</Reference>
7870
<Reference Include="System" />
7971
<Reference Include="System.Core" />
8072
<Reference Include="System.Xml.Linq" />

AzureWebFarm.OctopusDeploy.Tests/Infrastructure/OctopusDeployTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using NSubstitute;
99
using Octopus.Client;
1010
using Octopus.Client.Model;
11-
using Octopus.Platform.Model;
1211
using Xunit;
1312
using Shouldly;
1413

AzureWebFarm.OctopusDeploy.Tests/app.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
<assemblyIdentity name="NSubstitute" publicKeyToken="92dd2e9066daa5ca" culture="neutral" />
77
<bindingRedirect oldVersion="0.0.0.0-1.7.2.0" newVersion="1.7.2.0" />
88
</dependentAssembly>
9+
<dependentAssembly>
10+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
11+
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
12+
</dependentAssembly>
913
</assemblyBinding>
1014
</runtime>
1115
</configuration>

AzureWebFarm.OctopusDeploy.Tests/packages.config

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
<package id="Autofac" version="3.3.0" targetFramework="net45" />
66
<package id="AutofacContrib.NSubstitute" version="3.2.0" targetFramework="net45" />
77
<package id="Microsoft.Web.Xdt" version="1.0.0" targetFramework="net45" />
8-
<package id="Newtonsoft.Json" version="5.0.8" targetFramework="net45" />
8+
<package id="Newtonsoft.Json" version="6.0.3" targetFramework="net45" />
99
<package id="NSubstitute" version="1.7.2.0" targetFramework="net45" />
10-
<package id="Octopus.Client" version="2.0.12.1092" targetFramework="net45" />
10+
<package id="Octopus.Client" version="3.1.7" targetFramework="net45" />
1111
<package id="Shouldly" version="1.1.1.1" targetFramework="net45" />
12-
<package id="Sprache" version="1.10.0.35" targetFramework="net45" />
1312
<package id="xunit" version="1.9.2" targetFramework="net45" />
1413
<package id="xunit.extensions" version="1.9.2" targetFramework="net45" />
1514
</packages>

AzureWebFarm.OctopusDeploy/AzureWebFarm.OctopusDeploy.csproj

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,13 @@
5555
<SpecificVersion>False</SpecificVersion>
5656
<HintPath>..\packages\WindowsAzure.Storage.2.1.0.3\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
5757
</Reference>
58-
<Reference Include="Newtonsoft.Json">
59-
<HintPath>..\packages\Newtonsoft.Json.5.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
60-
</Reference>
61-
<Reference Include="Octopus.Client, Version=2.0.12.0, Culture=neutral, processorArchitecture=MSIL">
62-
<SpecificVersion>False</SpecificVersion>
63-
<HintPath>..\packages\Octopus.Client.2.0.12.1092\lib\net40\Octopus.Client.dll</HintPath>
58+
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
59+
<HintPath>..\packages\Newtonsoft.Json.6.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
60+
<Private>True</Private>
6461
</Reference>
65-
<Reference Include="Octopus.Platform, Version=2.0.12.0, Culture=neutral, processorArchitecture=MSIL">
66-
<SpecificVersion>False</SpecificVersion>
67-
<HintPath>..\packages\Octopus.Client.2.0.12.1092\lib\net40\Octopus.Platform.dll</HintPath>
62+
<Reference Include="Octopus.Client, Version=3.1.7.0, Culture=neutral, processorArchitecture=MSIL">
63+
<HintPath>..\packages\Octopus.Client.3.1.7\lib\net40\Octopus.Client.dll</HintPath>
64+
<Private>True</Private>
6865
</Reference>
6966
<Reference Include="Serilog, Version=1.2.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
7067
<SpecificVersion>False</SpecificVersion>
@@ -78,9 +75,6 @@
7875
<SpecificVersion>False</SpecificVersion>
7976
<HintPath>..\packages\Serilog.Sinks.AzureTableStorage.1.2.25\lib\net45\Serilog.Sinks.AzureTableStorage.dll</HintPath>
8077
</Reference>
81-
<Reference Include="Sprache">
82-
<HintPath>..\packages\Sprache.1.10.0.35\lib\net40\Sprache.dll</HintPath>
83-
</Reference>
8478
<Reference Include="System" />
8579
<Reference Include="System.Core" />
8680
<Reference Include="System.Data.Services.Client" />
@@ -105,6 +99,7 @@
10599
<Compile Include="WebFarmRole.cs" />
106100
</ItemGroup>
107101
<ItemGroup>
102+
<None Include="app.config" />
108103
<None Include="AzureWebFarm.OctopusDeploy.nuspec" />
109104
<None Include="packages.config" />
110105
<None Include="Tools\install.ps1" />

AzureWebFarm.OctopusDeploy/Infrastructure/OctopusDeploy.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using Microsoft.WindowsAzure.ServiceRuntime;
88
using Octopus.Client;
99
using Octopus.Client.Model;
10-
using Octopus.Platform.Model;
1110
using Serilog;
1211

1312
namespace AzureWebFarm.OctopusDeploy.Infrastructure
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<runtime>
4+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5+
<dependentAssembly>
6+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
7+
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
8+
</dependentAssembly>
9+
</assemblyBinding>
10+
</runtime>
11+
</configuration>

AzureWebFarm.OctopusDeploy/packages.config

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
<package id="Microsoft.Data.OData" version="5.2.0" targetFramework="net45" />
55
<package id="Microsoft.Web.Administration" version="7.0.0.0" targetFramework="net45" />
66
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
7-
<package id="Newtonsoft.Json" version="5.0.8" targetFramework="net45" />
8-
<package id="Octopus.Client" version="2.0.12.1092" targetFramework="net45" />
7+
<package id="Newtonsoft.Json" version="6.0.3" targetFramework="net45" />
8+
<package id="Octopus.Client" version="3.1.7" targetFramework="net45" />
99
<package id="Serilog" version="1.2.25" targetFramework="net45" />
1010
<package id="Serilog.Sinks.AzureTableStorage" version="1.2.25" targetFramework="net45" />
11-
<package id="Sprache" version="1.10.0.35" targetFramework="net45" />
1211
<package id="System.Spatial" version="5.2.0" targetFramework="net45" />
1312
<package id="WindowsAzure.Storage" version="2.1.0.3" targetFramework="net45" />
1413
</packages>

ExampleWebFarm/ExampleWebFarm.csproj

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,13 @@
6565
<SpecificVersion>False</SpecificVersion>
6666
<HintPath>..\packages\WindowsAzure.Storage.2.1.0.3\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
6767
</Reference>
68-
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
69-
<SpecificVersion>False</SpecificVersion>
70-
<HintPath>..\packages\Newtonsoft.Json.5.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
71-
</Reference>
72-
<Reference Include="Octopus.Client, Version=2.0.12.0, Culture=neutral, processorArchitecture=MSIL">
73-
<SpecificVersion>False</SpecificVersion>
74-
<HintPath>..\packages\Octopus.Client.2.0.12.1092\lib\net40\Octopus.Client.dll</HintPath>
68+
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
69+
<HintPath>..\packages\Newtonsoft.Json.6.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
70+
<Private>True</Private>
7571
</Reference>
76-
<Reference Include="Octopus.Platform, Version=2.0.12.0, Culture=neutral, processorArchitecture=MSIL">
77-
<SpecificVersion>False</SpecificVersion>
78-
<HintPath>..\packages\Octopus.Client.2.0.12.1092\lib\net40\Octopus.Platform.dll</HintPath>
72+
<Reference Include="Octopus.Client, Version=3.1.7.0, Culture=neutral, processorArchitecture=MSIL">
73+
<HintPath>..\packages\Octopus.Client.3.1.7\lib\net40\Octopus.Client.dll</HintPath>
74+
<Private>True</Private>
7975
</Reference>
8076
<Reference Include="Serilog, Version=1.2.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
8177
<SpecificVersion>False</SpecificVersion>
@@ -89,10 +85,6 @@
8985
<SpecificVersion>False</SpecificVersion>
9086
<HintPath>..\packages\Serilog.Sinks.AzureTableStorage.1.2.25\lib\net45\Serilog.Sinks.AzureTableStorage.dll</HintPath>
9187
</Reference>
92-
<Reference Include="Sprache, Version=1.10.0.35, Culture=neutral, processorArchitecture=MSIL">
93-
<SpecificVersion>False</SpecificVersion>
94-
<HintPath>..\packages\Sprache.1.10.0.35\lib\net40\Sprache.dll</HintPath>
95-
</Reference>
9688
<Reference Include="System" />
9789
<Reference Include="System.Data" />
9890
<Reference Include="System.Data.DataSetExtensions" />

ExampleWebFarm/Web.config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,12 @@
1111
<compilation debug="true" targetFramework="4.5" />
1212
<httpRuntime targetFramework="4.5" />
1313
</system.web>
14+
<runtime>
15+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
16+
<dependentAssembly>
17+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
18+
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
19+
</dependentAssembly>
20+
</assemblyBinding>
21+
</runtime>
1422
</configuration>

0 commit comments

Comments
 (0)