The latest mono 4.4 has supported the operation of the ASP. NET MVC5 project, some students listened to the words on the cheerful pick up visual Studio 2015 created an MVC 5 project, and then deployed to mono, browsing under the discovery of a bunch of errors appear, Heart 10,000 grass mud horse Pentium come, this also called support, this problem is caused by Visual Studio, If you don't believe it, you can use the ASP. Xamarin.studio to create the project, the deployment process is very smooth, no problems encountered; This article is for you to solve this knot, how visual Studio 2015 takes care of cross-platform development of ASP. NET MVC 5 projects.
VS2015 create a new ASP. NET project (the target framework is. net4.5), select MVC, and change authentication to not apply authentication.
Compile, and publish to Jexus, to access it. The reported error message is as follows.
Could not find File "/var/www/mvcdemo/bin\roslyn\csc.exe". This line tells us that we can not find Roslyn C # compiler, the current version of the Mono compiler or mono MCs compiler, and did not complete to Roslyn This compiler upgrade work is in progress, in the near future will be unified use of Roslyn.
The solution to this problem is to use the Mono MCs compiler, right-click on the project to manage NuGet packages, open the manager, and sequentially uninstall the following two components:
L Microsoft.CodeDom.Providers.DotNetCompilerPlatform
L Microsoft.Net.Compilers
Re-release to Jexus, through the browser can see the fresh bootstrap interface, Mono 4.4.2 version of the current compatibility with MVC5 is quite good.
Other compatibility issues are windows/linux differences, such as case and path issues, such as System.Web.Webpages.dll, which are loaded from NuGet, and pages in the middle of several related DLLs are lowercase and need to be capitalized. Bootstrap a few front-end frame There are also some case-insensitive, some styles can not be displayed, I will jexus the case-insensitive to open the good.
In Jexus, you just need to/usr/jexus/jws this script file "Export mono_iomap= ..." The sentence before the "#" removed, you can not distinguish between the case.
[Email protected]/usr/jexus]# VI JWs
Deploying the ASP. NET MVC 5 project to Mono/jexus using Visual Studio 2015