roslyn icon indicating copy to clipboard operation
roslyn copied to clipboard

Make scripting work in single-file deployments

Open svick opened this issue 4 years ago • 10 comments

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.

svick avatar Nov 21 '21 17:11 svick

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?

svick avatar Dec 02 '21 12:12 svick

Is it for .NET 5 or 6 ?

VladiStep avatar Dec 19 '21 14:12 VladiStep

Any ETA?

BlackOfWorld avatar Jan 11 '22 16:01 BlackOfWorld

@svick, are you still interested in this PR?

333fred avatar Jan 11 '22 18:01 333fred

How's the progress?

NMSAzulX avatar Sep 06 '22 09:09 NMSAzulX

Hello. Any ETA?

NMSAzulX avatar Feb 15 '23 06:02 NMSAzulX

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 avatar Apr 25 '23 03:04 NMSAzulX

@NMSAzulX no one seems to be working on this pr currently.

CyrusNajmabadi avatar Apr 25 '23 07:04 CyrusNajmabadi

@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 avatar Nov 27 '25 20:11 misiek08

@misiek08 we'd likely consider a follow up here from someone, but it would be fairly low on our review list.

333fred avatar Dec 11 '25 01:12 333fred