问题
I have a bit of a weird question. Is is possible to maybe CodeDom or Emit compile a Win8 Metro app (.NET or HTML5/JS) from within a Win8 Metro app and then run it (not install it, just run it until user closes it/stops it)? I guess it is sort of a MEF-ish need.
I haven't been able to find any references to this kind of need. I've tried to wade through what Rosetta is/does, but haven't gotten very far in understanding how it is better/different than CodeDom or Emit and if it could even be what I'm looking for.
回答1:
No. Windows 8 Metro style apps can only access .NET Framework classes in the Core Profile (a subset of the full .NET Framework). System.CodeDom is not part of the Core Profile. If you have a Win8 CP machine installed, you can see the Core Profile reference assemblies with ILDasm or ILSpy at ...
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\
Check out A .NET developer's view of Windows 8 app development from Build for a discussion of the .NET Profile for Metro style apps.
来源:https://stackoverflow.com/questions/10644397/compiling-an-win8-app-from-a-win8-metro-app-and-possibly-run-it-sandboxed