mod_mono 问题:无法解析名称“ConfigurationManager”
我在 Ubuntu 上运行 mod_mono 2.4.4,我发现我必须检查 VB 文件并向所有文件添加“imports System.Configuration”才能解决名称错误。这在 Windows 端的 mod_aspdotnet 中是不必要的。
I have, however, run into one error of which I can't find the source:
System.Web.Compilation.CompilationException: VBNC30451: Could not resolve the name 'ConfigurationManager'
at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x00000]
at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000]
at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Collections.Generic.List`1 buildItems, System.Web.VirtualPath virtualPath, BuildKind buildKind) [0x00000]
at System.Web.Compilation.BuildManager.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000]
这是由于遗漏步骤或配置不正确导致我必须继续添加此导入吗?
I'm running mod_mono 2.4.4 on Ubuntu and I'm finding that I've had to go through my VB files and add "imports System.Configuration" to all of them to resolve the name error. This was not necessary in mod_aspdotnet on the Windows side.
I have, however, run into one error of which I can't find the source:
System.Web.Compilation.CompilationException: VBNC30451: Could not resolve the name 'ConfigurationManager'
at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x00000]
at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000]
at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Collections.Generic.List`1 buildItems, System.Web.VirtualPath virtualPath, BuildKind buildKind) [0x00000]
at System.Web.Compilation.BuildManager.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000]
Is this the result of a missed step or incorrect configuration that I have to keep adding this import?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
某个地方,可能是/etc/mono/2.0/web.config,有一个默认配置文件。验证它是否包含类似以下内容:
这是默认值。这应该负责添加默认导入。
顺便说一句,mod_mono 2.4.4 现在有点旧了。尝试获取更新的软件包。
Somewhere, probably /etc/mono/2.0/web.config, there's a default configuration file. Verify that it contains something like this:
Which is the default. That should take care of adding the default imports.
Btw, mod_mono 2.4.4 is a bit old these days. Try getting newer packages.