在 asp.net App_Code 目录中使用 Nemerle

发布于 2024-07-24 22:33:59 字数 2039 浏览 6 评论 0原文

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

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

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

运行时出现此异常:

程序集 '' 已加载到另一个应用程序域中。 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

我做错了什么?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

你是年少的欢喜 2024-07-31 22:33:59

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

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

白云不回头 2024-07-31 22:33:59

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

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

巡山小妖精 2024-07-31 22:33:59

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

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

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 __^

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文