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

GetReferencesForCompilation Problem in Android #77966

Open
DLSinnocence opened this issue Apr 2, 2025 · 0 comments
Open

GetReferencesForCompilation Problem in Android #77966

DLSinnocence opened this issue Apr 2, 2025 · 0 comments
Labels
Area-Interactive untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@DLSinnocence
Copy link

var corLib = MetadataReference.CreateFromAssemblyInternal(typeof(object).GetTypeInfo().Assembly);
references.Add(corLib);

I found codes in class CodeAnalysis.Scripting.Script.It looks to provide a default assembly metadata reference.However, It cause a error in Android because the assembly is in the .apk file.

The mistake was like

Could not find a part of the path "/data/app/…………/mscorlib.dll"

I found issues #23537 , #24442.I think it is the same problem

I've tried using other methods to read the assemblies I need, but I can't get around here.

I think there should be a way to provide the metadata reference by myelf.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Interactive untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Interactive untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

1 participant