我们选择用xamarin studio来测试,如果你直接进xamarin的官网,那么会有一个更好看的网站和更复杂的流程(比如需要注册),我们直接到mono项目找mac的支持吧,点此进入
Microsoft ASP.NET
MVC
这个项目,点击安装Mono/.NET 4.5
即可<package id="Microsoft.AspNet.Mvc"
version="5.1.1" targetFramework="net45" />
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.1.0.0" newVersion="5.1.0.0" />
</dependentAssembly>
Access to the path
"/Library/Frameworks/Mono.framework/Versions/3.2.5/etc/mono/registry" is
denied.
的错误,点此查看解决办法,我选择了执行脚本的方法,而不是去个性csproj文件System.InvalidOperationException Conflicting versions
of ASP.NET Web Pages detected: specified version is “1.0.0.0”, but the
version in bin is “3.0.0.0”. To continue, remove files from the
application’s bin directory or remove the version specification in
web.config
错误,我们找到项目的web.config文件,直接删除掉appSetting
节点下的<add
key="webpages:Version" value="1.0.0.0" />
(你也可以改为3.0.0.0)System.InvalidOperationExceptionCould not locate Razor
Host Factory type: System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc,
Version=3.0.0.0
,这个时候,找到view
目录下的web.config文件,定位到system.web.webPages.razor/host
节点(错误提示很明确了),把其中的3.0.0.0改为5.1.0.0Run ASP.NET MVC site on mac (mono/xamarin studio),布布扣,bubuko.com
Run ASP.NET MVC site on mac (mono/xamarin studio)
原文:http://www.cnblogs.com/walkerwang/p/3598671.html