Skip to content

Commit d7641d4

Browse files
committed
Remove NETFX building from EVERYWHERE!
1 parent b460824 commit d7641d4

File tree

55 files changed

+192
-1663
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+192
-1663
lines changed

build/Build.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public Build()
152152
{
153153
if (OperatingSystem.IsWindows())
154154
{
155-
DotNetRestore(s => s.SetProjectFile(RootProjectName))
155+
DotNetRestore(s => s.SetProjectFile(RootProjectName));
156156
}
157157

158158

source/Calamari.Aws/Calamari.Aws.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
<ApplicationManifest>Calamari.Aws.exe.manifest</ApplicationManifest>
1919
<ApplicationIcon />
2020
<StartupObject />
21-
<TargetFrameworks>net462;netstandard2.1</TargetFrameworks>
21+
<TargetFramework>net6.0</TargetFramework>
22+
<LangVersion>10</LangVersion>
2223
</PropertyGroup>
2324
<ItemGroup>
2425
<PackageReference Include="AWSSDK.EKS" Version="3.7.13.24" />

source/Calamari.Azure/Calamari.Azure.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<Authors>Octopus Deploy</Authors>
77
<Copyright>Octopus Deploy Pty Ltd</Copyright>
88
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64;linux-arm;linux-arm64</RuntimeIdentifiers>
9-
<LangVersion>8.0</LangVersion>
10-
<TargetFrameworks>net462;net6.0</TargetFrameworks>
9+
<LangVersion>10</LangVersion>
10+
<TargetFramework>net6.0</TargetFramework>
1111
</PropertyGroup>
1212
<ItemGroup>
1313
<PackageReference Include="Azure.Identity" Version="1.13.1" />

source/Calamari.AzureAppService/Behaviors/AzureAppServiceZipDeployBehaviour.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,7 @@ private async Task UploadZipAsync(IAzureAccount azureAccount,
231231
//we add some retry just in case the web app's Kudu/SCM is not running just yet
232232
var response = await RetryPolicies.TransientHttpErrorsPolicy.ExecuteAsync(async () =>
233233
{
234-
#if NETFRAMEWORK
235-
using var fileStream = new FileStream(uploadZipPath, FileMode.Open, FileAccess.Read, FileShare.Read);
236-
#else
237234
await using var fileStream = new FileStream(uploadZipPath, FileMode.Open, FileAccess.Read, FileShare.Read);
238-
#endif
239235
using var streamContent = new StreamContent(fileStream);
240236
streamContent.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
241237

@@ -313,11 +309,7 @@ private async Task UploadZipAndPollAsync(IAzureAccount azureAccount,
313309
var uploadResponse = await RetryPolicies.TransientHttpErrorsPolicy.ExecuteAsync(async () =>
314310
{
315311
//we have to create a new request message each time
316-
#if NETFRAMEWORK
317-
using var fileStream = new FileStream(uploadZipPath, FileMode.Open, FileAccess.Read, FileShare.Read);
318-
#else
319312
await using var fileStream = new FileStream(uploadZipPath, FileMode.Open, FileAccess.Read, FileShare.Read);
320-
#endif
321313
using var streamContent = new StreamContent(fileStream);
322314
streamContent.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
323315

source/Calamari.AzureScripting.Tests/Calamari.AzureScripting.Tests.csproj

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,6 @@
2626
<PackageReference Include="TeamCity.VSTest.TestAdapter" Version="1.0.25" />
2727
<PackageReference Include="NSubstitute" Version="4.2.1" />
2828
<PackageReference Include="Shouldly" Version="2.8.2" />
29-
<PackageReference Include="Octopus.Dependencies.AzureCLI" Version="2.0.50" GeneratePathProperty="true" />
30-
<PackageReference Include="Octopus.Dependencies.AzureCmdlets" Version="6.13.1" GeneratePathProperty="true" />
31-
<PackageReference Include="FluentAssertions" Version="6.7.0"/>
32-
<PackageReference Include="nunit" Version="3.13.3"/>
33-
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1"/>
34-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.0"/>
35-
<PackageReference Include="TeamCity.VSTest.TestAdapter" Version="1.0.25"/>
36-
<PackageReference Include="NSubstitute" Version="4.2.1"/>
37-
<PackageReference Include="Shouldly" Version="2.8.2"/>
38-
<PackageReference Include="Octopus.Dependencies.AzureCLI" Version="2.0.50" GeneratePathProperty="true"/>
39-
<PackageReference Include="Octopus.Dependencies.AzureCmdlets" Version="6.13.1" GeneratePathProperty="true"/>
4029
</ItemGroup>
4130
<ItemGroup>
4231

source/Calamari.AzureServiceFabric.Tests/Calamari.AzureServiceFabric.Tests.csproj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@
2424
<PackageReference Include="TeamCity.VSTest.TestAdapter" Version="1.0.25" />
2525
<PackageReference Include="NSubstitute" Version="4.2.2" />
2626
<PackageReference Include="Shouldly" Version="3.0.2" />
27-
<PackageReference Include="FluentAssertions" Version="5.10.3"/>
28-
<PackageReference Include="nunit" Version="3.13.3"/>
29-
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0"/>
30-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0"/>
31-
<PackageReference Include="TeamCity.VSTest.TestAdapter" Version="1.0.25"/>
32-
<PackageReference Include="NSubstitute" Version="4.2.2"/>
33-
<PackageReference Include="Shouldly" Version="3.0.2"/>
3427
</ItemGroup>
3528
<ItemGroup>
3629
<ProjectReference Include="..\Calamari.AzureServiceFabric\Calamari.AzureServiceFabric.csproj"/>

source/Calamari.AzureServiceFabric/ServiceFabricHelper.cs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,11 @@ static class ServiceFabricHelper
88
{
99
public static bool IsServiceFabricSdkInstalled()
1010
{
11-
var isInstalled = false;
12-
#if NETFRAMEWORK
13-
using (var rootKey = Microsoft.Win32.RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, Microsoft.Win32.RegistryView.Registry64))
14-
using (var subKey = rootKey.OpenSubKey(@"SOFTWARE\Microsoft\Service Fabric SDK", false))
15-
{
16-
if (subKey != null)
17-
isInstalled = true;
18-
}
19-
#else
2011
var programFiles = Environment.ExpandEnvironmentVariables("%ProgramFiles(x86)%");
2112
var sdkFolderPath = System.IO.Path.Combine("Microsoft SDKs", "Service Fabric");
2213

2314
//x86 first
24-
isInstalled = System.IO.Directory.Exists(System.IO.Path.Combine(programFiles, sdkFolderPath));
15+
var isInstalled = System.IO.Directory.Exists(System.IO.Path.Combine(programFiles, sdkFolderPath));
2516

2617
//we first look in the x86 path, if it's not there, we check in the x64 program files
2718
if (!isInstalled)
@@ -41,8 +32,7 @@ public static bool IsServiceFabricSdkInstalled()
4132
//check to see if the directory exists again in the new program files
4233
isInstalled = System.IO.Directory.Exists(System.IO.Path.Combine(programFiles, sdkFolderPath));
4334
}
44-
45-
#endif
35+
4636
return isInstalled;
4737
}
4838

source/Calamari.AzureWebApp/NetCoreWebDeploymentExecutor.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#if !NETFRAMEWORK
2-
using System;
1+
using System;
32
using System.Collections.Generic;
43
using System.IO;
54
using System.Linq;
@@ -246,5 +245,4 @@ static string BuildPath(AzureTargetSite site, IVariables variables)
246245
: site.Site;
247246
}
248247
}
249-
}
250-
#endif
248+
}

source/Calamari.AzureWebApp/NetFxWebDeploymentExecutor.cs

Lines changed: 0 additions & 181 deletions
This file was deleted.

source/Calamari.AzureWebApp/Program.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,7 @@ protected override void ConfigureContainer(ContainerBuilder builder, CommonOptio
2222
base.ConfigureContainer(builder, options);
2323

2424
builder.RegisterType<ResourceManagerPublishProfileProvider>().SingleInstance();
25-
26-
#if NETFRAMEWORK
27-
builder.RegisterType<NetFxWebDeploymentExecutor>().As<IWebDeploymentExecutor>();
28-
#else
2925
builder.RegisterType<NetCoreWebDeploymentExecutor>().As<IWebDeploymentExecutor>();
30-
#endif
3126
}
3227

3328
protected override IEnumerable<Assembly> GetProgramAssembliesToRegister()

0 commit comments

Comments
 (0)