ClickOnce and Docker Code Signing Problems

Strongly-named Assembly Required
Strongly-named Assembly Required

ClickOnce and Strongly-named Assembly

I build a multi-target .NET project, DomainModel, that supports .NET framework and .NET Core and publish the Windows Form Application as the client using Microsoft ClickOnce requiring the shared DomainModel be strongly-named. However, it doesn’t make sense on a docker node in Azure.

Publish Error on Azure Docker Node

Docker command failed with exit code 1.
#15 ERROR: executor failed running [/bin/sh -c dotnet build "Services.csproj" -c Release -o /app/build]: exit code: 1
#15 64.73 /usr/share/dotnet/sdk/5.0.302/Microsoft.Common.CurrentVersion.targets(3325,5): error : PFX signing not supported on .NET Core [/src/DomainModel/DomainModel.csproj]
#15 64.76 Build FAILED.

Conclusion

I have to manually check the “Sign the assembly” option when publishing the Windows Form application and uncheck it when publishing services to Azure docker nodes.

Leave a Reply