-
Notifications
You must be signed in to change notification settings - Fork 353
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
Arcade targets override AssemblyOriginatorKeyFile #2321
Comments
By the same reasoning, it seems like arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/StrongName.targets Lines 18 to 21 in 9800953
|
Why do you need to set |
I see you need to use Cecil's key. Does that snk file have public & private key pair? |
This will break |
Setting |
Thanks, that's what I was missing when I was trying to figure out what these properties were for. We don't use this, but I'll set the |
@sbomer - anything more to do here? |
@markwilkie, updated the original issue to remove my comment about |
The intent here is to override the project settings if the projects sets |
Thoughts @sbomer ? (also cc'ing @JohnTortugo ) |
@markwilkie Sorry for the delayed response. My angle is that it should be easy as possible for an existing SDK project to start using arcade (and it definitely shouldn't require digging through arcade targets to come up with a workaround). Maybe that's not really a design goal, in which case feel free to close this. In my mind I'm guessing that making it opt-in is more work than it's worth at this point, because presumably lots of arcade projects are already using the default So maybe a blend of @tmat's suggestions would provide a nice opt-out. You could set |
You can set |
That is the goal. :) |
@sbomer - should I assume you're waiting for error reporting before closing this bug? |
I'm personally hoping for an improved error and the |
* Use SDK-style projects for linker and tests * Clean up linker project file Separate out the illink build properties from the monolinker properties. Also disable building illink for net46 on unix/core msbuild, which doesn't work due to missing reference assemblies. This check is more specific than what we used to have, so that illink can potentially be built with the mono runtime. Building this project with "nuget restore" and "msbuild" will only work with the default configuration because nuget restore does not set the configuration and would see a different target framework from msbuild. * Fix assembly title and description for illink * Fix debug and optimization info for illink configurations * Remove references to old illink solutions * Update cecil submodule to latest mono/cecil * Fix typo * Update cecil configurations in illink.sln * Fix cecil strongname build failure with arcade Work around dotnet/arcade#2321 * Remove unused configs from monolinker.sln Also add a missing release config for cecil * Set PublicKey and PublicKeyToken in cecil overrides
Adding to the SDK epic (priority) for post P7 |
* Use SDK-style projects for linker and tests * Clean up linker project file Separate out the illink build properties from the monolinker properties. Also disable building illink for net46 on unix/core msbuild, which doesn't work due to missing reference assemblies. This check is more specific than what we used to have, so that illink can potentially be built with the mono runtime. Building this project with "nuget restore" and "msbuild" will only work with the default configuration because nuget restore does not set the configuration and would see a different target framework from msbuild. * Fix assembly title and description for illink * Fix debug and optimization info for illink configurations * Remove references to old illink solutions * Update cecil submodule to latest mono/cecil * Fix typo * Update cecil configurations in illink.sln * Fix cecil strongname build failure with arcade Work around dotnet/arcade#2321 * Remove unused configs from monolinker.sln Also add a missing release config for cecil * Set PublicKey and PublicKeyToken in cecil overrides Commit migrated from dotnet/linker@6280036
When using arcade to publish a project that sets
AssemblyOriginatorKeyFile
,StrongName.targets
overrides the key file (because arcade imports set a default value forStrongNameKeyId
):arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/StrongName.targets
Line 35 in 9800953
I believe
StrongName.targets
should not be setting properties as this violates the convention that static properties are computed in props files. Maybe this logic should be moved toStrongName.props
, which would allow my project's setting ofAssemblyOriginatorKeyFile
to take precedence.I can work around this by:
StrongNameKeyId
in my project to some unknown string, preventing arcade's override, andPublicKey
andPublicKeyToken
to some unknown string to satisfy the check inarcade/src/Microsoft.DotNet.Arcade.Sdk/tools/StrongName.targets
Lines 84 to 85 in 9800953
I may have missed something, but I couldn't find any place whereedit: they're used in the arcadePublicKey
orPublicKeyToken
were actually used, so I think those shouldn't be required to be set in the first place.InternalsVisibleTo
generator - see below.The text was updated successfully, but these errors were encountered: