Skip to content

Commit 75c482f

Browse files
authored
Build the nuget tool for both .NET 8 and .NET 10 (#343)
2 parents c78b0e3 + e989d6c commit 75c482f

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PackageVersion Include="Azure.Identity" Version="1.17.0" />
44
<PackageVersion Include="Azure.Security.KeyVault.Certificates" Version="4.8.0" />
55
<PackageVersion Include="Azure.Security.KeyVault.Keys" Version="4.8.0" />
6+
<PackageVersion Include="Microsoft.Bcl.Cryptography" Version="10.0.0" />
67
<PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="10.0.0" />
78
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.0" />
89
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="10.0.0" />

build/build.ps1

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ Remove-Item -Path $objDir\AzureSignTool.nupkg
6363

6464
& "$sdkBinPath\signtool.exe" sign /d "AzureSign.Core" /sha1 73f0844a95e35441a676cd6be1e79a3cd51d00b4 /fd SHA384 /td SHA384 /tr "http://timestamp.digicert.com" /du "https://github.com/vcsjones/AzureSignTool" "$objDir\AzureSign.Core.nupkg.dir\lib\net8.0\AzureSign.Core.dll"
6565
& "$sdkBinPath\signtool.exe" sign /d "AzureSign.Core" /sha1 73f0844a95e35441a676cd6be1e79a3cd51d00b4 /fd SHA384 /td SHA384 /tr "http://timestamp.digicert.com" /du "https://github.com/vcsjones/AzureSignTool" "$objDir\AzureSign.Core.nupkg.dir\lib\netstandard2.0\AzureSign.Core.dll"
66+
& "$sdkBinPath\signtool.exe" sign /d "AzureSignTool" /sha1 73f0844a95e35441a676cd6be1e79a3cd51d00b4 /fd SHA384 /td SHA384 /tr "http://timestamp.digicert.com" /du "https://github.com/vcsjones/AzureSignTool" "$objDir\AzureSignTool.nupkg.dir\tools\net8.0\any\AzureSignTool.dll"
6667
& "$sdkBinPath\signtool.exe" sign /d "AzureSignTool" /sha1 73f0844a95e35441a676cd6be1e79a3cd51d00b4 /fd SHA384 /td SHA384 /tr "http://timestamp.digicert.com" /du "https://github.com/vcsjones/AzureSignTool" "$objDir\AzureSignTool.nupkg.dir\tools\net10.0\any\AzureSignTool.dll"
6768

69+
Copy-Item -Path "$objDir\AzureSign.Core.nupkg.dir\lib\net8.0\AzureSign.Core.dll" -Destination "$objDir\AzureSignTool.nupkg.dir\tools\net8.0\any\AzureSign.Core.dll"
6870
Copy-Item -Path "$objDir\AzureSign.Core.nupkg.dir\lib\net8.0\AzureSign.Core.dll" -Destination "$objDir\AzureSignTool.nupkg.dir\tools\net10.0\any\AzureSign.Core.dll"
6971

7072
Compress-Archive -Path "$objDir\AzureSign.Core.nupkg.dir\*" -DestinationPath "$objDir\AzureSign.Core.nupkg"
@@ -76,11 +78,11 @@ dotnet nuget sign --certificate-fingerprint 68821304869e065c24e0684eb43bf974e124
7678
Copy-Item -Path "$objDir\AzureSign.Core.nupkg" -Destination "$outDir\AzureSign.Core.nupkg"
7779
Copy-Item -Path "$objDir\AzureSignTool.nupkg" -Destination "$outDir\AzureSignTool.nupkg"
7880

79-
dotnet publish -c Release -r win-arm64 -p:ContinuousIntegrationBuild=true -o "$objDir\AzureSignTool-arm64" .\src\AzureSignTool\AzureSignTool.csproj
80-
dotnet publish -c Release -r win-x64 -p:ContinuousIntegrationBuild=true -o "$objDir\AzureSignTool-x64" .\src\AzureSignTool\AzureSignTool.csproj
81+
dotnet publish -f net10.0 -c Release -r win-arm64 -p:ContinuousIntegrationBuild=true -o "$objDir\AzureSignTool-arm64" .\src\AzureSignTool\AzureSignTool.csproj
82+
dotnet publish -f net10.0 -c Release -r win-x64 -p:ContinuousIntegrationBuild=true -o "$objDir\AzureSignTool-x64" .\src\AzureSignTool\AzureSignTool.csproj
8183

82-
& "$sdkBinPath\signtool.exe" sign /d "AzureSignTool" /sha1 73f0844a95e35441a676cd6be1e79a3cd51d00b4 /fd SHA384 /td SHA384 /tr "http://timestamp.digicert.com" /du "https://github.com/vcsjones/AzureSignTool" "$objDir\AzureSignTool-x64\AzureSignTool.exe"
83-
& "$sdkBinPath\signtool.exe" sign /d "AzureSignTool" /sha1 73f0844a95e35441a676cd6be1e79a3cd51d00b4 /fd SHA384 /td SHA384 /tr "http://timestamp.digicert.com" /du "https://github.com/vcsjones/AzureSignTool" "$objDir\AzureSignTool-arm64\AzureSignTool.exe"
84+
& "$sdkBinPath\signtool.exe" sign /d "AzureSignTool" /sha1 73f0844a95e35441a676cd6be1e79a3cd51d00b4 /fd SHA384 /td SHA384 /tr "http://timestamp.digicert.com" /du "https://github.com/vcsjones/AzureSignTool" "$objDir\AzureSignTool-x64\AzureSignTool.exe"
85+
& "$sdkBinPath\signtool.exe" sign /d "AzureSignTool" /sha1 73f0844a95e35441a676cd6be1e79a3cd51d00b4 /fd SHA384 /td SHA384 /tr "http://timestamp.digicert.com" /du "https://github.com/vcsjones/AzureSignTool" "$objDir\AzureSignTool-arm64\AzureSignTool.exe"
8486

8587
Copy-Item -Path "$objDir\AzureSignTool-x64\AzureSignTool.exe" -Destination "$outDir\AzureSignTool-x64.exe"
8688
Copy-Item -Path "$objDir\AzureSignTool-arm64\AzureSignTool.exe" -Destination "$outDir\AzureSignTool-arm64.exe"

src/AzureSignTool/AzureSignTool.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net10.0</TargetFramework>
5+
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
66
<PackAsTool>true</PackAsTool>
77
<ToolCommandName>azuresigntool</ToolCommandName>
88
<Description>Azure Sign Tool is similar to signtool in the Windows SDK, with the major difference being that it uses Azure Key Vault for performing the signing process. The usage is like signtool, except with a limited set of options for signing and options for authenticating to Azure Key Vault.</Description>
@@ -29,6 +29,10 @@
2929
</PackageReference>
3030
</ItemGroup>
3131

32+
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">
33+
<PackageReference Include="Microsoft.Bcl.Cryptography" />
34+
</ItemGroup>
35+
3236
<ItemGroup>
3337
<ProjectReference Include="..\AzureSign.Core\AzureSign.Core.csproj" />
3438
</ItemGroup>

0 commit comments

Comments
 (0)