在asp.net App_Code目录中使用Nemerle

时间:2009-06-12 18:06:24

标签: asp.net nemerle

我想在ASP.NET应用程序中使用Nemerle。具体来说,将.n文件放入App_Code。

我将此添加到我的web.config system.codedom / compilers部分:

<compiler language="n;Nemerle" extension=".n" type="Nemerle.Compiler.NemerleCodeProvider, Nemerle.Compiler"/>

跑步时我得到这个例外:

程序集''已经加载到另一个appdomain中。在machine.config中设置可以帮助解决这个问题。

堆栈跟踪

[HttpException (0x80004005): The assembly '' is already loaded in another appdomain. Setting <deployment retail="true" /> in machine.config can help solve this issue.]
   System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +8809675
   System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +128
   System.Web.Compilation.BuildManager.CompileCodeDirectories() +265
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +320

[HttpException (0x80004005): The assembly '' is already loaded in another appdomain. Setting <deployment retail="true" /> in machine.config can help solve this issue.]
   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729

[HttpException (0x80004005): The assembly '' is already loaded in another appdomain. Setting <deployment retail="true" /> in machine.config can help solve this issue.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8890735
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259

我做错了什么?

3 个答案:

答案 0 :(得分:1)

我在Visual Studio 2010中发现的偶然问题。停止任何正在运行的虚拟Web服务器主机进程并重新启动Visual Studio。

答案 1 :(得分:0)

看起来你缺少.config块中的一些必需属性。以下是更详细的官方常见问题解答,我没有理由在此处复制任何可能过时的过时信息:Nemerle ASP.NET FAQ

答案 2 :(得分:0)

我也想要它,但是,App_Code文件夹用于webSite,我不知道如何让Nemerle和WebSite一起工作。目前跟踪这个想法。但是默认情况下你无法创建Nemerle webSite。

如果你正在使用Web应用程序,你可以使用名为“PinkElephant”的代码文件夹或者你想要的代码 - 它肯定会解决你的问题__ ^