Using System.CodeDom.Compiler.CodeDomProvider I can able to compile codes till .Net 4+. So I can dynamically compile the code in runtime and invoke any WinFrom forms using C# Reflection programmatically.
Similarly can we do that in UWP platform? I tried the same flow with UWP, but those compiler assemblies are not supported in UWP.
Asked
Active
Viewed 233 times
2

Ramanan
- 159
- 1
- 11
-
Why? Really curious. – MoDu Dec 19 '17 at 16:30
1 Answers
0
Short answer: Probably not
Why?
UWP is sandboxed so it would be a bit of a risk to allow dynamic code compilation, because then the app could potentially do something it's not supposed to, while making it harder for the automated scans in the store to detect malicious behaviour.
However, depending on what you actually need this for, you could always use the System.Expression
namespace (see: here) to compile certain pieces of functionality on the fly.
You could then have an all-purpose page, that you just substitute functionality in and out of.

Clint
- 6,133
- 2
- 27
- 48