在 asp.net App_Code 目录中使用 Nemerle
我想在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我在 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.
看起来您在 .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
我也想要它,但是,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 __^