Using Nemerle in asp.net App_Code directory
Asked Answered
W

3

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?

Wurst answered 12/6, 2009 at 18:6 Comment(0)
C
1

An occasional problem I've found with Visual Studio 2010. Stop any running virtual web server host processes and restart Visual Studio.

Calamint answered 11/7, 2009 at 2:29 Comment(0)
K
0

It looks like you're missing some of the required attributes in the .config block. Here's the official FAQ with more detail, no reason for me to duplicate any possibly later-to-be outdated information here: Nemerle ASP.NET FAQ

Kandacekandahar answered 22/8, 2009 at 19:53 Comment(0)
R
0

I want it too, but so, App_Code folder is for webSite, I have no idea how to make Nemerle and WebSite works together. Currently tracking this idea. But you can't create Nemerle webSite by default.

If you're using Web Application you can use code folder named "PinkElephant" or what ever you want - and it will solve your problem for sure __^

Roseanneroseate answered 18/3, 2010 at 6:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.