Sdk: Signing does not work on non-Windows

Created on 16 Aug 2016  路  10Comments  路  Source: dotnet/sdk

When signing on non-Windows platforms, we get output something like:
error CS7027: Error signing output with public key from file '/Users/livarcocc/Documents/git/core-sdk/build/Targets/../Strong Name Keys/RoslynInternalKey.Private.snk' -- Assembly signing not supported.
Once signing is supported on non-Windows, remove the condition in Common.props.

Bug

Most helpful comment

@333fred - can we use something like:

<PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>

To support at least public signing our assemblies on non-Windows?

All 10 comments

Condition introduced in #56

Have we verified there is an existing bug in https://github.com/dotnet/roslyn for this? Or should we log one?

Doesn't look like there is an issue

@jaredpar, do you want us to log an issue there, or on an internal repo?

This concerns signing full on CoreCLR correct? If so this issue covers it:

https://github.com/dotnet/roslyn/issues/8210

@333fred - can we use something like:

<PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>

To support at least public signing our assemblies on non-Windows?

Potentially? I'm not sure if PublicSign is supported on non-Windows, and I don't have a non-Windows box to test with.

According to @tmat, it is supported on non-Windows.

Then yeah, we should be able to. I'd say we probably want to change SignAssembly to always be true, and add the Windows_NT condition to https://github.com/dotnet/sdk/blob/1986d8099f115674535962cf90deddcc91533602/build/Targets/Signing.Imports.targets#L19

I believe this is related to: https://github.com/dotnet/cli/issues/6911 but i fail to see the workaround or resolution for that.

Was this page helpful?
0 / 5 - 0 ratings