-
Notifications
You must be signed in to change notification settings - Fork 376
Added Test.snk and related fixes from the buildtools repo #6203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
MattGal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed for teams porting their repos off BuildTools
|
Why do test assemblies need to be strong-name signed? |
So they can directly call privates: https://docs.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.internalsvisibletoattribute?view=netcore-3.1 (note this is test-signing only) |
|
ML.NET allows some of the test assemblies access to the internals of the shipping assemblies for testing purposes. The internals that are shared are different between the shipping assemblies and test assemblies in some cases. So the test assemblies are signed with a different key than the shipping assemblies. |
|
I see, but why in that case do you need a different key? Using the same key simplifies things. |
|
Two keys are used to distinguish access to internals by other shipping binaries from access by test binaries. |
|
What benefit does this distinction have? In Roslyn repo we use the same key for all binaries. |
|
@eerhardt Can you please help with the question above? This was done prior to my time and I am not sure of the rationale for this. Is it okay to change ML.NET to be strong name signed with the same key for all binaries? |
That's just the way it was done in dotnet/corefx at the time that dotnet/machinelearning was set up. We basically snap-shotted the build infrastructure from corefx and cloned it to dotnet/machinelearning and made it work for ML.NET. Then we left it alone, until now. In |
|
@eerhardt Thanks for the explanation. It sounds like there is no impact if we change ML.NET to all be signed with the same key for strong naming. I will go ahead and do that. And once I have verified that it works, I will abandon this PR. Thank you everybody. |
|
@harishsk Looks like there hasn't been movement on this in a while. Is this still something that ML.NET wants? |
|
I don't believe this PR is necessary anymore. But I will let @michaelgsharp make the final call. |
|
Its not. We changed the certificates as suggested by @eerhardt so we are good. |
|
This seems to be stalled. Is this still relevant, or should we close the PR? |
|
I'm just closing it based off this:
|
|
Thanks for closing, @riarenas. I can confirm this is no longer necessary. |
ML.NET still relies on buildtools and I am in the process of migrating it to Arcade. ML.NET uses different keys for strong name signing the shipping binaries and the test binaries. Arcade has support Open.snk for strong name signing the shipping binaries but not for Test.snk for signing the test binaries.
This PR adds Test.snk from buildtools and adds related support in the Arcade props and targets files.