I'm having an issue with my workflow, I need to be able to get the code sign certificate from Single file deployment and executables or even worse compress the assembly
The following application settings will break the code signing certificate extraction
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishReadyToRun>true</PublishReadyToRun>
</PropertyGroup>
</Project>
This will not work if a client uses the above single file app settings:
var self = typeof(MyClass).Assembly;
if (string.IsNullOrEmpty(self.Location))
{
return null;
}
return X509Certificate2.CreateFromSignedFile(self.Location);
I have no control over the end dll and I also do not want to as developers should be free to use the deployment settings that best fits their needs, I, however, would like to get the codesign certificate...