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

[BUG] Could not load file or assembly 'System.Memory 4.0.1.1 #48503

Open
concocon opened this issue Mar 2, 2025 · 4 comments
Open

[BUG] Could not load file or assembly 'System.Memory 4.0.1.1 #48503

concocon opened this issue Mar 2, 2025 · 4 comments
Assignees
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-author-feedback Workflow: More information is needed from author to address the issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@concocon
Copy link

concocon commented Mar 2, 2025

Library name and version

Azure.Core 1.44.1; Azure.Identity: 1.13.2; System.Memory: 4.5.5; System.Memory.Data: 6.0.0

Describe the bug

I have:

InteractiveBrowserCredentialOptions interactiveBrowserCredentialOptions = new InteractiveBrowserCredentialOptions() 
{ 
           ClientId = clientId, 
          TenantId = tenantId, 
          AuthorityHost = AzureAuthorityHosts.AzurePublicCloud,
           RedirectUri = new Uri("http://localhost"), };

but I got this excption: System.TypeInitializationException: The type initializer for 'Azure.Core.ClientOptions' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.

Expected behavior

Ideally Azure.core 1.44 should depend on System.memory 4.5.5 only.

Actual behavior

I got this excption: System.TypeInitializationException: The type initializer for 'Azure.Core.ClientOptions' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.

Reproduction Steps

I have:

InteractiveBrowserCredentialOptions interactiveBrowserCredentialOptions = new InteractiveBrowserCredentialOptions() 
{ 
           ClientId = clientId, 
          TenantId = tenantId, 
          AuthorityHost = AzureAuthorityHosts.AzurePublicCloud,
           RedirectUri = new Uri("http://localhost"), };

but I got this excption: System.TypeInitializationException: The type initializer for 'Azure.Core.ClientOptions' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.

It runs well on VS2022, but when I make a setup file and install to C://Proggramfile(x86)..., I got above error

Environment

Vs2022
C# Netframework 4.8

@github-actions github-actions bot added Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Mar 2, 2025
Copy link

github-actions bot commented Mar 2, 2025

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@christothes christothes added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Mar 3, 2025
@github-actions github-actions bot removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Mar 3, 2025
Copy link

github-actions bot commented Mar 3, 2025

Hi @concocon. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

@christothes christothes removed the needs-author-feedback Workflow: More information is needed from author to address the issue. label Mar 3, 2025
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Mar 3, 2025
@christothes
Copy link
Member

Hi @concocon
Could you share the full stack trace from the exception?
Also how are you making a setup file to install the application?

@christothes christothes added needs-author-feedback Workflow: More information is needed from author to address the issue. and removed needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels Mar 3, 2025
Copy link

github-actions bot commented Mar 3, 2025

Hi @concocon. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-author-feedback Workflow: More information is needed from author to address the issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
Status: Untriaged
Development

No branches or pull requests

2 participants