I gather that you want to compile Stub.txt using the code you wrote in Source.cs.
There's a LOT of wonkiness going on in this code.
Why is your class not internal and sealed/static?
Your class name doesn't express that its responsibility is to compile code.
Your method name isn't a verb and doesn't express its responsibility well.
Don't start local variable names with an uppercase character.
You are replacing placeholders in the source code that don't exist.
You're not using the ProviderOptions variable.
ProviderOptions contains both an invalid key and an invalid value. I think you meant "CompilerVersion" and "v4.7".
You are specifying a .NET Framework compiler version, but at the same time you're mixing in .NET Core assembly names.
Why are you using File.AppendAllText() in combination with line breaks? Just use File.AppendAllLines(), or even better File.AppendAllLinesAsync().
You are performing really non-sensical LINQ queries on the compiler application's referenced assemblies. Did you mean to use Where() instead of Select()?
Why use LINQ expressions to get the referenced assemblies at all?
Why are you using string interpolation when you're not actually interpolating anything?
With the last three bullet points I mean that you can rewrite:
Seeing as you're compiling your source code with .NET Framework (or at least, you would if you used ProviderOptions at all and specified correct keys and values), most of the namespaces you require are contained in the System.dll assembly. Referencing .NET Core assemblies from a .NET Framework application is a bad idea.
Try this and see how far it gets you:
I haven't tested this code. That's up to you.
When you get back to us, please also mention what .NET version you're using to run your compiler application.