Spacebuilder在Mono上运行修改备忘

简介:

Spacebuilder 是一个asp.net mvc3项目,使用到了Combres,Combres依赖于dotless,然后在Spacebuilder的项目没有见到的dotless,运行要求dotless 1.3.0.2版本,通过Nuget获取:

Install-Package dotless -Version 1.3.0.2

修改web.config加入dotless配置:

<configuration> 
  <configSections> 
    <section name="combres" requirePermission="false" type="Combres.ConfigSectionSetting, Combres, Version=2.2.2.6" /> 
    <section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler, dotless.Core" /> 
  </configSections>

……

  <dotless minifyCss="false" cache="true" web="false" />

</configuration>

另外将Microsoft.Web.Infrastructure.dll 剔除,让程序使用Mono自带的动态库,具体参看 Linux.NET学习手记(5)或者 Get MVC3 Razor Running on Mono。

访问 http://mono.cloudapp.net/ ,接着又发生了数据库连接错误:System.NotImplementedException (SSL encryption for data sent between client and server is not implemented.)在stackoverflow上看到了类似问题:http://stackoverflow.com/questions/14075667/cant-connect-to-sql-azure-database-using-monotouch,看来通过Windows Azure来做测试没戏,还得老实搭建本地环境来测试。

在Windows Azure独立建立一个虚拟机安装SQL Server 2008 R2,手工安装spb。

System.InvalidProgramException

Invalid IL code in System.Web.Handlers.ScriptModule:.ctor (): method body is empty.

Description: HTTP 500.Error processing request.

Details: Non-web exception. Exception origin (name of application or object): mscorlib.

Exception stack trace:

at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0

需要使用mono版本的System.Web.Extensions.dll,System.Web.WebPages.Administration.dll}}U6{Y~IX~GAI2W~([T]NZM

在Mono 下以上程序集就可以跑ASP.NET mvc 3.

web.config 添加上了 <globalization culture="zh-CN" uiCulture="en-US"/> 但还是报错

System.ArgumentNullException

Argument cannot be null. Parameter name: key

Description: HTTP 500.Error processing request.

Details: Non-web exception. Exception origin (name of application or object): mscorlib.

Exception stack trace:

at System.Resources.ResourceManager.InternalGetResourceSet (System.Globalization.CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) [0x00000] in <filename unknown>:0 at System.Resources.ResourceManager.InternalGetResourceSet (System.Globalization.CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) [0x00000] in <filename unknown>:0 at System.Resources.ResourceManager.InternalGetResourceSet (System.Globalization.CultureInfo culture, Boolean createIfNotExists, Boolean tryParents) [0x00000] in <filename unknown>:0 at System.Resources.ResourceManager.GetString (System.String name, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 at System.Web.Razor.Resources.RazorResources.get_BlockName_Code () [0x00000] in <filename unknown>:0 at System.Web.Razor.Parser.CSharpCodeParser.ParseBlock () [0x00000] in <filename unknown>:0 at System.Web.Razor.Parser.ParserBase.ParseBlockWithOtherParser (System.Web.Razor.Parser.SyntaxTree.SpanFactory previousSpanFactory, Boolean collectTransitionToken) [0x00000] in <filename unknown>:0 at System.Web.Razor.Parser.HtmlMarkupParser.TryStartCodeParser (Boolean isSingleLineMarkup, Boolean documentLevel) [0x00000] in <filename unknown>:0 at System.Web.Razor.Parser.HtmlMarkupParser.ParseRootBlock (System.Tuple`2 nestingSequences, Boolean caseSensitive) [0x00000] in <filename unknown>:0 at System.Web.Razor.Parser.HtmlMarkupParser.ParseDocument () [0x00000] in <filename unknown>:0 at System.Web.Razor.Parser.RazorParser.Parse (System.Web.Razor.Text.LookaheadTextReader input, System.Web.Razor.Parser.ParserVisitor visitor) [0x00000] in <filename unknown>:0 at System.Web.Razor.RazorTemplateEngine.GenerateCodeCore (System.Web.Razor.Text.LookaheadTextReader input, System.String className, System.String rootNamespace, System.String sourceFileName, Nullable`1 cancelToken) [0x00000] in <filename unknown>:0 at System.Web.Razor.RazorTemplateEngine.GenerateCode (System.IO.TextReader input, System.String className, System.String rootNamespace, System.String sourceFileName, Nullable`1 cancelToken) [0x00000] in <filename unknown>:0 at System.Web.Razor.RazorTemplateEngine.GenerateCode (System.IO.TextReader input, System.String className, System.String rootNamespace, System.String sourceFileName) [0x00000] in <filename unknown>:0 at System.Web.WebPages.Razor.RazorBuildProvider.EnsureGeneratedCode () [0x00000] in <filename unknown>:0 at System.Web.WebPages.Razor.RazorBuildProvider.get_CodeCompilerType () [0x00000] in <filename unknown>:0 at System.Web.Compilation.BuildManagerDirectoryBuilder.GetBuildProviderCodeDomType (System.Web.Compilation.BuildProvider bp) [0x00000] in <filename unknown>:0 at System.Web.Compilation.BuildManagerDirectoryBuilder.AssignToGroup (System.Web.Compilation.BuildProvider buildProvider, System.Collections.Generic.List`1 groups) [0x00000] in <filename unknown>:0 at System.Web.Compilation.BuildManagerDirectoryBuilder.Build (Boolean single) [0x00000] in <filename unknown>:0 at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0 at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp) [0x00000] in <filename unknown>:0 at System.Web.Compilation.BuildManager.GetCompiledType (System.Web.VirtualPath virtualPath) [0x00000] in <filename unknown>:0 at System.Web.Compilation.BuildManager.GetCompiledType (System.String virtualPath) [0x00000] in <filename unknown>:0 at System.Web.Mvc.BuildManagerWrapper.System.Web.Mvc.IBuildManager.GetCompiledType (System.String virtualPath) [0x00000] in <filename unknown>:0 at System.Web.Mvc.BuildManagerCompiledView.Render (System.Web.Mvc.ViewContext viewContext, System.IO.TextWriter writer) [0x00000] in <filename unknown>:0 at System.Web.Mvc.ViewResultBase.ExecuteResult (System.Web.Mvc.ControllerContext context) [0x00000] in <filename unknown>:0 at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) [0x00000] in <filename unknown>:0 at System.Web.Mvc.ControllerActionInvoker+<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19 () [0x00000] in <filename unknown>:0 at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter (IResultFilter filter, System.Web.Mvc.ResultExecutingContext preContext, System.Func`1

Running Mono 3.2.0 with .NET MVC 4

本文来自云栖社区合作伙伴“doNET跨平台”,了解相关信息可以关注“opendotnet”微信公众号

目录
相关文章
|
8月前
|
缓存 小程序 Android开发
mPaaS问题之更改包名之后就进不了小程序如何解决
mPaaS小程序是阿里巴巴移动平台服务(mPaaS)推出的一种轻量级应用解决方案,旨在帮助开发者快速构建跨平台的小程序应用;本合集将聚焦mPaaS小程序的开发流程、技术架构和最佳实践,以及如何解决开发中遇到的问题,从而助力开发者高效打造和维护小程序应用。
136 1
|
iOS开发
完整版在xcode打测试专用ipa包流程​
完整版在xcode打测试专用ipa包流程​
|
7月前
|
Java 编译器 C++
详尽分享通过exe启动class
详尽分享通过exe启动class
33 1
|
开发工具 开发者 iOS开发
​ 如何处理Xcode上传IPA文件后无法在后台架构版本中显示的问题?
1、ipa包符合要求,显示正在处理,这种就是成功上传,等待处理即可(根据包大小,一般处理几分钟到一两个钟都有可能) 2、ipa不符合要求,没有出现正在处理,或者刷新页面正在处理的版本消失 出现这种情况说明你上传的这个ipa包有问题,苹果会发送具体原因到邮箱(开发者账号就是邮箱地址,) 登录邮箱去查看反馈邮件(反馈邮件也可能在垃圾箱),修改错误重新再打包上传。
​  如何处理Xcode上传IPA文件后无法在后台架构版本中显示的问题?
|
Java Maven
同事被嘲笑后找到多种解决SpringBoot项目编译运行提示“程序包xxx不存在,找不到符号”方案
同事被嘲笑后找到多种解决SpringBoot项目编译运行提示“程序包xxx不存在,找不到符号”方案
354 0
同事被嘲笑后找到多种解决SpringBoot项目编译运行提示“程序包xxx不存在,找不到符号”方案
|
Java 定位技术 语音技术
​如何处理Xcode上传IPA文件后无法在后台架构版本中显示的问题?
​如何处理Xcode上传IPA文件后无法在后台架构版本中显示的问题?
Java 实现批量重命名,亲测可用(精简版)
Java 实现批量重命名,亲测可用(精简版)
115 0
|
Java 数据安全/隐私保护 Windows
idea2022版本下载安装配置卸载(包含运行第一个java程序教程)详细步骤
JDK和IDEA的关系举个例子 JDK:武器(java开发集成环境) IDEA:战士 (java开发软件)
527 0
idea2022版本下载安装配置卸载(包含运行第一个java程序教程)详细步骤
DeepStream运行范例出错,提示缺少libnvinfer.so怎么办?
DeepStream运行范例出错,提示缺少libnvinfer.so怎么办?
421 0
|
Ubuntu Shell 计算机视觉
Qt实用技巧:ubuntu发布程序打包流程(解决插件xcb加载失败)
Qt实用技巧:ubuntu发布程序打包流程(解决插件xcb加载失败)
Qt实用技巧:ubuntu发布程序打包流程(解决插件xcb加载失败)