Make scripting work in single-file deployments
Fixes https://github.com/dotnet/roslyn/issues/50719.
Note that the added test tests referencing in-memory assemblies from a script. That's not quite the same as testing single-file deployment, but I don't know a reasonable way to do that. I did try doing that manually and it worked on my machines.
I just noticed that MetadataReference.CreateFromAssembly is obsolete with the message:
Use CreateFromFile(assembly.Location) instead
With this change, CreateFromAssembly(assembly) becomes more powerful than CreateFromFile(assembly.Location). Does that mean CreateFromAssembly should be un-obsoleted?
Is it for .NET 5 or 6 ?
Any ETA?
@svick, are you still interested in this PR?
How's the progress?
Hello. Any ETA?
Dynamic compilation takes up too much memory. If this API appears, it may relieve the memory pressure. I have been waiting for two years. Any ETA?
@NMSAzulX no one seems to be working on this pr currently.
@CyrusNajmabadi @333fred as it is still an issue in .NET 10 world - do you see any chance of merging such changes? I can clear up the PR, remove the unnecessary(?) part of change.
It would be great to have some help with testing this correctly, but other than that I'm more than happy to help.
@misiek08 we'd likely consider a follow up here from someone, but it would be fairly low on our review list.