9

I want to use Nemerle in an ASP.NET application. Specifically, putting .n files into App_Code.

I added this to my web.config system.codedom/compilers section:

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

When running I get this exception:

The assembly '' is already loaded in another appdomain. Setting in machine.config can help solve this issue.

Stack trace

[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

What am I doing wrong?

4

3 回答 3

1

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

于 2009-07-11T02:29:29.690 回答
0

我也想要它,但是,App_Code 文件夹是用于 webSite 的,我不知道如何使 Nemerle 和 WebSite 一起工作。目前正在跟踪这个想法。但是您不能默认创建 Nemerle 网站。

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

于 2010-03-18T06:19:35.523 回答
0

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

于 2009-08-22T19:53:32.800 回答