Skip to content
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

Azure.Storage.Blobs: Should [assembly: InternalsVisibleTo] test attributes be removed in the released NuGet package? #11022

Closed
stakx opened this issue Apr 3, 2020 · 4 comments
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@stakx
Copy link

stakx commented Apr 3, 2020

Query/Question
This issue lies somewhere between a question and a bug report.

The main assembly of the Azure.Storage.Blobs NuGet package (version 12.4.0) carries these two custom attributes:

[assembly: InternalsVisibleTo("Azure.Storage.Blobs.Tests, PublicKey=" +
    "0024000004800000940000000602000000240000525341310004000001000100d15ddcb2968829" +
    "5338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc" +
    "012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265" +
    "e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593d" +
    "aa7b11b4")]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]

They're obviously needed for the test project. But is it wise to include them in the released NuGet package?

I cannot be certain at this time, but the latter attribute possibly causes trouble for downstream users; see castleproject/Core#488 and devlooped/moq#991.

Environment:

  • Azure.Storage.Blobs 12.4.0
  • I'm investigating the issues linked in the description above on Windows 10, using Visual Studio 2017 and .NET Core 2.2
@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Apr 3, 2020
@AlexGhiondea AlexGhiondea added Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files) labels Apr 3, 2020
@ghost
Copy link

ghost commented Apr 3, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Apr 3, 2020
@AlexGhiondea
Copy link
Contributor

/cc @pakrym @tg-msft

@pakrym
Copy link
Contributor

pakrym commented Apr 3, 2020

The usual practice is not to remove the attribute.

Quick search showed that there are a lot of libraries shipping with it.

I also think there is a bug in how castle core detects if members are visible (I've commented on a linked issue)

azure.data.appconfiguration
azure.identity
azure.messaging.eventhubs
azure.messaging.eventhubs.processor
azure.security.keyvault.certificates
azure.security.keyvault.keys
azure.storage.blobs
azure.storage.common
azure.storage.files.shares
azure.storage.queues
castle.core
dotnet-format
microsoft.applicationinsights
microsoft.applicationinsights.dependencycollector
microsoft.applicationinsights.windowsserver.telemetrychannel
microsoft.aspnet.mvc
microsoft.aspnetcore.antiforgery
microsoft.aspnetcore.app.ref
microsoft.aspnetcore.dataprotection
microsoft.aspnetcore.diagnostics
microsoft.aspnetcore.mvc.abstractions
microsoft.aspnetcore.mvc.core
microsoft.aspnetcore.mvc.taghelpers
microsoft.aspnetcore.mvc.viewfeatures
microsoft.aspnetcore.razor.design
microsoft.aspnetcore.razor.language
microsoft.codeanalysis.common
microsoft.codeanalysis.razor
microsoft.codeanalysis.workspaces.common
microsoft.codeanalysis.workspaces.msbuild
microsoft.codecoverage
microsoft.dotnet.internalabstractions
microsoft.dotnet.platformabstractions
microsoft.entityframeworkcore
microsoft.entityframeworkcore.relational
microsoft.entityframeworkcore.sqlserver
microsoft.extensions.configuration.azurekeyvault
microsoft.extensions.diagnosticadapter
microsoft.extensions.fileproviders.physical
microsoft.extensions.http
microsoft.extensions.http.polly
microsoft.identity.client
microsoft.identitymodel.clients.activedirectory
microsoft.internal.netsdkbuild.mgmt.tools
microsoft.net.compilers.toolset

@stakx
Copy link
Author

stakx commented Apr 3, 2020

@pakrym, thanks for the hint in the other issue... this seems to indeed be the main problem, which we should be able to fix in DynamicProxy.

Also, thanks for commenting on the usual practice on Microsoft's side, that's good to know and basically answers my question, so I think we can close this issue.

@stakx stakx closed this as completed Apr 3, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

3 participants