Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
66ace18
Remove net462 as a target framework from all projects
APErebus Nov 27, 2025
3b078e7
Tweak build process and clean up Calamari.Testing
APErebus Nov 27, 2025
cca0c16
Fix sbom
APErebus Nov 27, 2025
d99464f
Ignore win7-x86 rids
APErebus Nov 27, 2025
0f4da35
Clean up the buildable projects
APErebus Nov 27, 2025
c5fda4f
Fix compile
APErebus Nov 27, 2025
6a9ffee
Build the test project
APErebus Nov 27, 2025
f6d3bf1
Fix consolidation tests
APErebus Nov 27, 2025
2dad47c
Update LangVersion to default for all projects
APErebus Nov 27, 2025
0e17a0d
Change Calamari.Common to .NET 8.0 (from netstandard)
APErebus Nov 27, 2025
0831b61
Change remaining projects to .NET 8 from netstandard
APErebus Nov 27, 2025
242747c
Remove test attribute
APErebus Nov 27, 2025
5bf9a9c
Try and fix build issue
APErebus Nov 27, 2025
36625cc
Remove unused field
APErebus Nov 27, 2025
71908d1
Add ability to publish individual project
APErebus Nov 28, 2025
e600ddd
Merge branch 'main' into ap/remove-netfx
APErebus Dec 10, 2025
b374e98
Fix bad merge
APErebus Dec 10, 2025
b318e5d
Fix bad merge
APErebus Dec 10, 2025
aa72a73
Merge branch 'main' into ap/remove-netfx
APErebus Dec 10, 2025
0e2b947
Merge branch 'main' into ap/remove-netfx
APErebus Jan 8, 2026
e267a82
Merge branch 'main' into ap/remove-netfx
APErebus Jan 8, 2026
56c5353
Fix consolidated libraries not packing
APErebus Jan 8, 2026
629a213
Fix consolidation
APErebus Jan 8, 2026
de8126a
Merge branch 'main' into ap/remove-netfx
APErebus Jan 12, 2026
3dc4cc2
Make shim publish depend on the CalamariProjectsGetCalamariFlavourPro…
APErebus Jan 14, 2026
c393257
Change to only build a single project at a time
APErebus Jan 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
593 changes: 163 additions & 430 deletions build/Build.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/Build.sbom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ partial class Build
.Requires(() => DependencyTrackUrl)
.Requires(() => DependencyTrackApiKey)
.Requires(() => InternalDockerRegistry)
.DependsOn(Publish)
.DependsOn(PublishCalamariProjects)
.Executes(async () =>
{
ArgumentNullException.ThrowIfNull(Solution, nameof(Solution));
Expand Down
18 changes: 4 additions & 14 deletions build/CalamariPackageMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,9 @@

namespace Calamari.Build;

public class CalamariPackageMetadata
public class CalamariPackageMetadata(Project project, string framework, string architecture)
{
public CalamariPackageMetadata(Project project, string framework, string? architecture, bool isCrossPlatform)
{
Project = project;
Framework = framework;
Architecture = architecture;
IsCrossPlatform = isCrossPlatform;
}

public Project Project { get; }
public string Framework { get; }
public string? Architecture { get; }
public bool IsCrossPlatform { get; }

public Project Project { get; } = project;
public string Framework { get; } = framework;
public string Architecture { get; } = architecture;
}
2 changes: 1 addition & 1 deletion build/Frameworks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace Calamari.Build
{
public static class Frameworks
{
public const string Net462 = "net462";
public const string Net80 = "net8.0";
public const string Net80Windows = "net8.0-windows";
}
}
4 changes: 2 additions & 2 deletions source/Calamari.Aws/Calamari.Aws.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>1.0.0.0</Version>
<OutputType>Exe</OutputType>
<PlatformTarget>anycpu</PlatformTarget>
<AssemblyName>Calamari.Aws</AssemblyName>
<OutputType>Library</OutputType>
Expand All @@ -19,7 +18,8 @@
<ApplicationManifest>Calamari.Aws.exe.manifest</ApplicationManifest>
<ApplicationIcon />
<StartupObject />
<TargetFrameworks>net462;netstandard2.1</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>default</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ public class AmazonFileUploadException : Exception
public AmazonFileUploadException(){}
public AmazonFileUploadException(string message) : base(message){}
public AmazonFileUploadException(string message, Exception innerException) : base(message, innerException){}
protected AmazonFileUploadException(SerializationInfo info, StreamingContext context) : base(info, context){}
}
}
4 changes: 2 additions & 2 deletions source/Calamari.Azure/Calamari.Azure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<Authors>Octopus Deploy</Authors>
<Copyright>Octopus Deploy Pty Ltd</Copyright>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64;linux-arm;linux-arm64</RuntimeIdentifiers>
<LangVersion>8.0</LangVersion>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
<LangVersion>default</LangVersion>
<TargetFramework>net8.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<AssemblyName>Calamari.AzureAppService.Tests</AssemblyName>
<IsPackable>false</IsPackable>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64;linux-arm;linux-arm64</RuntimeIdentifiers>
<LangVersion>8.0</LangVersion>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
<LangVersion>default</LangVersion>
<TargetFramework>net8.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<IsPackable>true</IsPackable>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64;linux-arm;linux-arm64</RuntimeIdentifiers>
<LangVersion>8.0</LangVersion>
<LangVersion>default</LangVersion>
<NoWarn>NU5104</NoWarn>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<AssemblyName>Calamari.AzureResourceGroup.Tests</AssemblyName>
<IsPackable>false</IsPackable>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64;linux-arm;linux-arm64</RuntimeIdentifiers>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>default</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
Expand All @@ -13,7 +14,6 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
<PackageReference Include="Octopus.Dependencies.AzureCLI" Version="2.41.0" GeneratePathProperty="true" />
<PackageReference Include="TeamCity.VSTest.TestAdapter" Version="1.0.41" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0" Condition="'$(TargetFramework)' == 'net462'" />
</ItemGroup>
<Target Name="GetPackageFiles" AfterTargets="ResolveReferences" DependsOnTargets="RunResolvePackageDependencies">
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<PropertyGroup>
<RootNamespace>Calamari.AzureResourceGroup</RootNamespace>
<AssemblyName>Calamari.AzureResourceGroup</AssemblyName>
<LangVersion>8</LangVersion>
<LangVersion>default</LangVersion>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64;linux-arm;linux-arm64</RuntimeIdentifiers>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<PropertyGroup>
<RootNamespace>Calamari.AzureScripting.Tests</RootNamespace>
<AssemblyName>Calamari.AzureScripting.Tests</AssemblyName>
<LangVersion>8</LangVersion>
<LangVersion>default</LangVersion>
<Nullable>enable</Nullable>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64;linux-arm;linux-arm64</RuntimeIdentifiers>
<IsPackable>false</IsPackable>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
Expand All @@ -20,6 +20,7 @@
<PackageReference Include="Shouldly" Version="2.8.2" />
<PackageReference Include="Octopus.Dependencies.AzureCLI" Version="2.0.50" GeneratePathProperty="true" />
<PackageReference Include="Octopus.Dependencies.AzureCmdlets" Version="6.13.1" GeneratePathProperty="true" />
<PackageReference Include="Octopus.Server.Extensibility" Version="14.3.2" />
</ItemGroup>
<ItemGroup>

Expand Down Expand Up @@ -50,7 +51,4 @@
<ProjectReference Include="..\Calamari.AzureScripting\Calamari.AzureScripting.csproj" />
<ProjectReference Include="..\Calamari.Testing\Calamari.Testing.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Octopus.Server.Extensibility" Version="14.3.2" />
</ItemGroup>
</Project>
11 changes: 4 additions & 7 deletions source/Calamari.AzureScripting/Calamari.AzureScripting.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,32 @@
<PropertyGroup>
<AssemblyName>Calamari.AzureScripting</AssemblyName>
<RootNamespace>Calamari.AzureScripting</RootNamespace>
<LangVersion>8</LangVersion>
<LangVersion>default</LangVersion>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64;linux-arm;linux-arm64</RuntimeIdentifiers>
<IsPackable>true</IsPackable>
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<EmbeddedResource Include="Scripts\*" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<ItemGroup>
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.66.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Calamari.Scripting\Calamari.Scripting.csproj" />
<ProjectReference Include="..\Calamari.CloudAccounts\Calamari.CloudAccounts.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Identity.Client" Version="4.66.2" />
</ItemGroup>

<!-- Extract dotnet-script zip files to support C# script execution -->
<Target Name="RunResolvePackageDependencies" Condition="'$(RunResolvePackageDependencies)' != ''" />
<Target Name="GetToolFiles" DependsOnTargets="RunResolvePackageDependencies">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<RootNamespace>Calamari.AzureServiceFabric.Tests</RootNamespace>
<AssemblyName>Calamari.AzureServiceFabric.Tests</AssemblyName>
<IsPackable>false</IsPackable>
<TargetFrameworks>net462;net8.0-windows</TargetFrameworks>
<TargetFramework>net8.0-windows</TargetFramework>
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
<LangVersion>8.0</LangVersion>
<LangVersion>default</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
<TargetFrameworks>net462;net8.0-windows</TargetFrameworks>
<TargetFramework>net8.0-windows</TargetFramework>
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
<LangVersion>8.0</LangVersion>
<LangVersion>default</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net462</TargetFramework>
<LangVersion>8.0</LangVersion>
<LangVersion>default</LangVersion>
<!-- CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. -->
<NoWarn>CS8632</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<PropertyGroup>
<RootNamespace>Calamari.AzureWebApp.Tests</RootNamespace>
<AssemblyName>Calamari.AzureWebApp.Tests</AssemblyName>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
<LangVersion>8.0</LangVersion>
<LangVersion>default</LangVersion>
<IsPackable>false</IsPackable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
Expand All @@ -27,15 +27,16 @@

<Target Name="GetNetCoreShimFiles">
<ItemGroup>
<NetCoreShimFiles Include="$(MSBuildProjectDirectory)/../Calamari.AzureWebApp/netcoreshim/netcoreshim.zip" Condition="'$(IsWindowsNetCoreBuild)' == 'true'"/>
<NetCoreShimFiles Include="$(MSBuildProjectDirectory)/../Calamari.AzureWebApp/netcoreshim/netcoreshim.zip" />
</ItemGroup>
</Target>

<Target Name="CopyNetCoreShimFilesAfterBuild" AfterTargets="Build" DependsOnTargets="GetNetCoreShimFiles">
<Unzip SourceFiles="@(NetCoreShimFiles)" DestinationFolder="$(OutputPath)/netcoreshim" SkipUnchangedFiles="true" Condition="'$(IsWindowsNetCoreBuild)' == 'true'" />
<Unzip SourceFiles="@(NetCoreShimFiles)" DestinationFolder="$(OutDir)/netcoreshim" SkipUnchangedFiles="true" />
</Target>

<Target Name="CopyNetCoreShimFilesAfterPublish" AfterTargets="Publish" DependsOnTargets="GetNetCoreShimFiles">
<Unzip SourceFiles="@(NetCoreShimFiles)" DestinationFolder="$(PublishDir)/netcoreshim" SkipUnchangedFiles="true" Condition="'$(IsWindowsNetCoreBuild)' == 'true'"/>
<Unzip SourceFiles="@(NetCoreShimFiles)" DestinationFolder="$(PublishDir)/netcoreshim" SkipUnchangedFiles="true" />
</Target>
</Project>
33 changes: 15 additions & 18 deletions source/Calamari.AzureWebApp/Calamari.AzureWebApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64;linux-arm;linux-arm64</RuntimeIdentifiers>
<LangVersion>8.0</LangVersion>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This project is only build for windows. I'm not sure why this has all the other runtime identifiers?

<LangVersion>default</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

Expand All @@ -26,11 +27,7 @@
<ProjectReference Include="..\Calamari.CloudAccounts\Calamari.CloudAccounts.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="Microsoft.Web.Deployment" Version="4.0.5"/>
</ItemGroup>

<ItemGroup Condition="'$(IsWindowsNetCoreBuild)' == 'true'">
<ItemGroup>
<Content Include="netcoreshim/*.*">
<LinkBase>netcoreshim</LinkBase>
<Pack>true</Pack>
Expand All @@ -56,13 +53,13 @@

<Target Name="GetNetCoreShimFiles">
<ItemGroup>
<NetCoreShimFiles Include="$(MSBuildProjectDirectory)/netcoreshim/netcoreshim.zip" Condition="'$(IsWindowsNetCoreBuild)' == 'true'"/>
<NetCoreShimFiles Include="$(MSBuildProjectDirectory)/netcoreshim/netcoreshim.zip"/>
</ItemGroup>
</Target>
<Target Name="CopyNetCoreShimFilesAfterBuild" AfterTargets="Build" DependsOnTargets="GetNetCoreShimFiles" Condition="'$(IsWindowsNetCoreBuild)' == 'true'" >
<Unzip SourceFiles="@(NetCoreShimFiles)" DestinationFolder="$(OutputPath)/netcoreshim" />
<Target Name="CopyNetCoreShimFilesAfterBuild" AfterTargets="Build" DependsOnTargets="GetNetCoreShimFiles">
<Unzip SourceFiles="@(NetCoreShimFiles)" DestinationFolder="$(OutDir)/netcoreshim" />
</Target>
<Target Name="CopyNetCoreShimFilesAfterPublish" AfterTargets="Publish" DependsOnTargets="GetNetCoreShimFiles" Condition="'$(IsWindowsNetCoreBuild)' == 'true'" >
<Target Name="CopyNetCoreShimFilesAfterPublish" AfterTargets="Publish" DependsOnTargets="GetNetCoreShimFiles">
<Unzip SourceFiles="@(NetCoreShimFiles)" DestinationFolder="$(PublishDir)/netcoreshim" />
</Target>

Expand All @@ -73,11 +70,11 @@
<DotnetScriptFiles Include="$(MSBuildProjectDirectory)/../Calamari.Scripting/DotnetScript/dotnet-script.*.zip"/>
</ItemGroup>
</Target>
<Target Name="CopyDotnetScriptFilesAfterBuild" AfterTargets="Build" DependsOnTargets="GetToolFiles">
<Unzip SourceFiles="@(DotnetScriptFiles)" DestinationFolder="$(OutputPath)/" />
</Target>

<Target Name="CopyDotnetScriptFilesAfterPublish" AfterTargets="Publish" DependsOnTargets="GetToolFiles">
<Unzip SourceFiles="@(DotnetScriptFiles)" DestinationFolder="$(PublishDir)/" />
</Target>
<Target Name="CopyDotnetScriptFilesAfterBuild" AfterTargets="Build" DependsOnTargets="GetToolFiles">
<Unzip SourceFiles="@(DotnetScriptFiles)" DestinationFolder="$(OutputPath)/" />
</Target>
<Target Name="CopyDotnetScriptFilesAfterPublish" AfterTargets="Publish" DependsOnTargets="GetToolFiles">
<Unzip SourceFiles="@(DotnetScriptFiles)" DestinationFolder="$(PublishDir)/" />
</Target>
</Project>
8 changes: 2 additions & 6 deletions source/Calamari.CloudAccounts/Calamari.CloudAccounts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

<PropertyGroup>
<RootNamespace>Calamari.CloudAccounts</RootNamespace>
<TargetFrameworks>net462;netstandard2.1</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>default</LangVersion>
<PackageId>Octopus.Calamari.CloudAccounts</PackageId>
<Title>Calamari.CloudAccounts</Title>
<Authors>Octopus Deploy</Authors>
Expand All @@ -13,11 +14,6 @@
<RepositoryType>git</RepositoryType>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="Microsoft.Net.Http" Version="2.2.29" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Calamari.Common\Calamari.Common.csproj" />
</ItemGroup>
Expand Down
Loading