dynamic-compilation

Loading ASCX control created dynamically (via code)

◇◆丶佛笑我妖孽 提交于 2020-01-03 13:31:24
问题 I am creating Web User Controls via code (my C# code write-out markup, code-behind and designer files to disk on a callback). The controls are created all fine. I can add them to my web-project and put them on a page. When I try to load the control using LoadControl(path) it says: Unable to load type 'MyNameSpace.UseControlClass' which is because control is not yet compiled. But my requirement is to load controls dynamically without recompiling the solution. How can I compile the user control

dynamic code compilation

。_饼干妹妹 提交于 2020-01-01 05:50:07
问题 I'm working on a program that renders iterated fractal systems. I wanted to add the functionality where someone could define their own iteration process, and compile that code so that it would run efficiently. I currently don't know how to do this and would like tips on what to read to learn how to do this. The main program is written in C++ and I'm familiar with C++. In fact given most of the scenarios I know how to convert it to assembly code that would accomplish the goal, but I don't know

MEF and MVC 3 - how to load embedded views dynamically from mef container?

那年仲夏 提交于 2020-01-01 02:30:12
问题 I'm building an MVC 3 application where MEF is used. The main idea is to have plug-in mechanism where models, controllers and views are loaded dynamically during runtime from mef container. Each plugin/module consists of two assemblies: Module1.Data.dll (contains definitions of models) Module1.Web.dll (contains controllers and views) and are put in the Plugins directory inside web application bin: WebApp/Bin/Plugins/Module1.Data.dll WebApp/Bin/Plugins/Module1.Web.dll WebApp/Bin/Plugins

ASP.NET: WCF and Could not load file or assembly 'App_Web_hamznvwf

跟風遠走 提交于 2019-12-30 11:13:07
问题 I have recently begun working with AJAX-Enabled WCF, and have been plagued with this .NET caching issue - Could not load file or assembly App__Web__hamznvwf I was having issues with this 4 to 5 times a day on my server (Win 2003) - see first post So I moved my files off of the server and started running the project locally (Win XP). Arghh! The issue came up again - locally . And it happened after a reboot! Do you think this is a network policy causing this issue on my local machine and server

Haskell GHC Dynamic Compliation Only works on first compile

柔情痞子 提交于 2019-12-22 04:58:20
问题 Following the GHC tutorial posted here and alterations to this code following the advice in a previous stack overflow question I asked, I have created a program which is able to compile and run a module in Test.hs with a function print to print a string to the screen: import GHC import GHC.Paths import DynFlags import Unsafe.Coerce main :: IO () main = defaultErrorHandler defaultLogAction $ do func <- runGhc (Just libdir) $ do dflags <- getSessionDynFlags setSessionDynFlags dflags target <-

Dynamic Compilation in Haskell GHC API Error

夙愿已清 提交于 2019-12-09 16:55:34
问题 I have been trying to get some basic dynamic code compilation working using the GHC API by following a tutorial found here. This code: import GHC import GHC.Paths import DynFlags import Unsafe.Coerce main :: IO () main = defaultErrorHandler defaultDynFlags $ do func <- runGhc (Just libdir) $ do dflags <- getSessionDynFlags setSessionDynFlags dflags target <- guessTarget "Test.hs" Nothing addTarget target r <- load LoadAllTargets case r of Failed -> error "Compilation failed" Succeeded -> do m

Where are the Assemblies for an ASP.NET Web Site When Running IIS Express

落爺英雄遲暮 提交于 2019-12-08 15:07:31
问题 I know that with dynamic compilation under an ASP.NET Web Site, code behind files get compiled into Assemblies. Where do these DLL's get stored when running IIS Express? Is it in memory only? I don't see them in the bin folder, or in the temp directory (C:\Windows\Microsoft.NET\Framework[64]\v4.0.30319). Typically I generate them when precompiling them whenever I publish. In this case, though, I don't see them. Am I missing something? Thanks. UPDATE: I did see dll's under C:\Users

Possible to get native performance for dynamically compiled code that can be unloaded?

自闭症网瘾萝莉.ら 提交于 2019-12-08 10:50:47
问题 I have a function that uses a tree-like structure of dictionaries to match against incoming structures coming in at a rate of several 100k/sec. It is already quite fast, but it needs to get even faster. In order to gauge how much faster it would get by compiling that piece of code in the most performant way, I hard-coded an optimized function for a particular tree of dictionaries, using nested switch statements (in this case, switching over byte s), and compared that to the dictionary-style

Haskell GHC Dynamic Compliation Only works on first compile

谁都会走 提交于 2019-12-05 07:05:33
Following the GHC tutorial posted here and alterations to this code following the advice in a previous stack overflow question I asked , I have created a program which is able to compile and run a module in Test.hs with a function print to print a string to the screen: import GHC import GHC.Paths import DynFlags import Unsafe.Coerce main :: IO () main = defaultErrorHandler defaultLogAction $ do func <- runGhc (Just libdir) $ do dflags <- getSessionDynFlags setSessionDynFlags dflags target <- guessTarget "Test.hs" Nothing addTarget target r <- load LoadAllTargets case r of Failed -> error

Dynamic Compilation in Haskell GHC API Error

拥有回忆 提交于 2019-12-04 05:05:10
I have been trying to get some basic dynamic code compilation working using the GHC API by following a tutorial found here . This code: import GHC import GHC.Paths import DynFlags import Unsafe.Coerce main :: IO () main = defaultErrorHandler defaultDynFlags $ do func <- runGhc (Just libdir) $ do dflags <- getSessionDynFlags setSessionDynFlags dflags target <- guessTarget "Test.hs" Nothing addTarget target r <- load LoadAllTargets case r of Failed -> error "Compilation failed" Succeeded -> do m <- findModule (mkModuleName "Test") Nothing setContext [] [m] value <- compileExpr ("Test.print") do