I should clarify that I am looking for a client-side solution.
Alternatively, is there a C# compiler written in managed code?
From stackoverflow
-
On the Client
Take a look at the Dynamic Language Runtime if you're using Silverlight 2.0:
- http://www.silverlightexamples.net/post/Execute-Code-String-at-Runtime-with-Silverlight-20-DLR.aspx
- http://silverlight.net/learn/dynamiclanguages.aspx
Server or Client with Full Trust
This example uses the Microsoft.CSharp.CSharpCodeProvider, compiles on the server, and sends the assembly down to the client:
There's a VB equivalent. They allow you to compile to disk or in memory. In most cases you can't use them on the client because they require full trust.
Other examples:
- http://blogs.microsoft.co.il/blogs/alex_golesh/archive/2007/12/20/how-to-compile-c-3-0-code-dynamically.aspx
- http://www.developerfusion.com/article/4529/using-net-to-make-your-application-scriptable/3/
Silverlight with full trust:
0 comments:
Post a Comment